aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrenton Schulz <trenton@norwegianrockcat.com>2023-06-04 05:32:21 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-06-08 10:51:07 +0000
commit8ffec20dfd5343afa84a818d3103f98deaea6005 (patch)
tree43275408a5cf23911cd5c578186c8e8b6d5706b5
parente17738bb406db9a605c935bb2078e0786237aeee (diff)
downloadports-8ffec20dfd5343afa84a818d3103f98deaea6005.tar.gz
ports-8ffec20dfd5343afa84a818d3103f98deaea6005.zip
sysutils/scanbd: Add new port
scanbd looks to be the continuation of scanbuttond, it accomplishes the same tasks, but supports all scanners from scanbuttond plus all the scanners supported by SANE. It uses dbus for communication and can also signal device insertion and removal. Upstream has moved to gitlab, so this is the last corresponding release based on the last SourceForge release (with some minor documentation updates). WWW: https://sourceforge.net/projects/scanbd/ PR: 271816
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/scanbd/Makefile38
-rw-r--r--sysutils/scanbd/distinfo3
-rwxr-xr-xsysutils/scanbd/files/scanbd.in16
-rw-r--r--sysutils/scanbd/pkg-descr17
-rw-r--r--sysutils/scanbd/pkg-plist17
6 files changed, 92 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index a161c16132e9..cfe9fc8071e5 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1324,6 +1324,7 @@
SUBDIR += savelogs
SUBDIR += scalpel
SUBDIR += scan_ffs
+ SUBDIR += scanbd
SUBDIR += scanbuttond
SUBDIR += scanmem
SUBDIR += scct
diff --git a/sysutils/scanbd/Makefile b/sysutils/scanbd/Makefile
new file mode 100644
index 000000000000..9ee2ef19027b
--- /dev/null
+++ b/sysutils/scanbd/Makefile
@@ -0,0 +1,38 @@
+PORTNAME= scanbd
+DISTVERSION= 1.5.1
+CATEGORIES= sysutils
+
+MAINTAINER= trueos@norwegianrockcat.com
+COMMENT= Scanner button daemon
+WWW= https://sourceforge.net/projects/scanbd/
+
+LICENSE= GPLv2
+
+BUILD_DEPENDS= sane-config:graphics/sane-backends
+LIB_DEPENDS= libdbus-1.so:devel/dbus \
+ libudev.so:devel/libudev-devd \
+ libconfuse.so:devel/libconfuse
+RUN_DEPENDS= bash:shells/bash \
+ scanimage:graphics/sane-backends
+
+USES= gettext-runtime gmake pkgconfig shebangfix
+
+USE_GITLAB= yes
+GL_ACCOUNT= sane-project/frontend
+GL_PROJECT= scanbd
+GL_COMMIT= 4503640d202c06510f21848a684e221f613f324b
+
+GNU_CONFIGURE= yes
+
+CONFIGURE_ARGS+= --with-user --with-group
+
+SHEBANG_GLOB= *.script
+
+USE_RC_SUBR= scanbd
+
+SUB_FILES= scanbd
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/scanbd ${STAGEDIR}${PREFIX}/etc/rc.d/scanbd
+
+.include <bsd.port.mk>
diff --git a/sysutils/scanbd/distinfo b/sysutils/scanbd/distinfo
new file mode 100644
index 000000000000..43296e31a0d7
--- /dev/null
+++ b/sysutils/scanbd/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1685858862
+SHA256 (sane-project/frontend-scanbd-4503640d202c06510f21848a684e221f613f324b_GL0.tar.gz) = 085d6c0e54048d3ab002f2d9b2a08d31ee3751d04c16cb7ed8826d58d06a54d6
+SIZE (sane-project/frontend-scanbd-4503640d202c06510f21848a684e221f613f324b_GL0.tar.gz) = 473189
diff --git a/sysutils/scanbd/files/scanbd.in b/sysutils/scanbd/files/scanbd.in
new file mode 100755
index 000000000000..e2924b9c6f9b
--- /dev/null
+++ b/sysutils/scanbd/files/scanbd.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+# PROVIDE: scanbd
+# REQUIRE: DAEMON FILESYSTEMS dbus
+# KEYWORD:
+
+. /etc/rc.subr
+
+name=scanbd
+# scanbd_user=saned # Fix this
+rcvar=scanbd_enable
+command_args=""
+command="%%PREFIX%%/sbin/${name}"
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/sysutils/scanbd/pkg-descr b/sysutils/scanbd/pkg-descr
new file mode 100644
index 000000000000..e868cf3a1a6c
--- /dev/null
+++ b/sysutils/scanbd/pkg-descr
@@ -0,0 +1,17 @@
+scanbd is daemon that listens for scanner button presses and can run scripts.
+
+From the project page:
+
+scanbd is a scanner button daemon. It polls the scanner buttons
+looking for buttons pressed or function knob changes or other scanner
+events as paper inserts / removals and at the same time allows also
+scan-applications to access the scanners. If buttons are pressed,
+etc., various actions can be submitted (scan, copy, email, ...) via
+action scripts. The function knob values are passed to the
+action-scripts as well. Scan actions are also signaled via dbus. This
+can be useful for foreign applications. Scans can also be triggered
+via dbus from foreign applications. On platforms which support
+signaling of dynamic device insertion / removal (libudev, dbus, hal)
+scanbd supports this as well. scanbd can use all sane-backends or some
+special backends from the (old) scanbuttond project. Supported
+platforms: Linux, FreeBSD, NetBSD, OpenBSD
diff --git a/sysutils/scanbd/pkg-plist b/sysutils/scanbd/pkg-plist
new file mode 100644
index 000000000000..11a68ee236ce
--- /dev/null
+++ b/sysutils/scanbd/pkg-plist
@@ -0,0 +1,17 @@
+%%ETCDIR%%/scripts/action.script
+%%ETCDIR%%/scripts/example.script
+%%ETCDIR%%/scripts/insert.script
+%%ETCDIR%%/scripts/scanadf.script
+%%ETCDIR%%/scripts/test.script
+%%ETCDIR%%/scanbd.conf
+%%ETCDIR%%/scanner.d/avision.conf
+%%ETCDIR%%/scanner.d/canon.conf
+%%ETCDIR%%/scanner.d/fujitsu.conf
+%%ETCDIR%%/scanner.d/hp.conf
+%%ETCDIR%%/scanner.d/pixma.conf
+%%ETCDIR%%/scanner.d/plustek.conf
+%%ETCDIR%%/scanner.d/snapscan.conf
+sbin/scanbd
+sbin/scanbm
+man/man8/scanbm.8.gz
+man/man8/scanbd.8.gz