diff --git a/sysutils/scanbd/Makefile b/sysutils/scanbd/Makefile index d94376c62c37..298b444f37af 100644 --- a/sysutils/scanbd/Makefile +++ b/sysutils/scanbd/Makefile @@ -1,46 +1,50 @@ PORTNAME= scanbd DISTVERSION= 1.5.1 -PORTREVISION= 1 +PORTREVISION= 2 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=saned --with-group=saned SHEBANG_GLOB= *.script USE_RC_SUBR= scanbd -SUB_FILES= scanbd +SUB_FILES= pkg-message \ + scanbd post-patch: - @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/conf/scanbd.conf + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/conf/scanbd.conf post-install: ${MV} ${STAGEDIR}${ETCDIR}/scanbd.conf ${STAGEDIR}${ETCDIR}/scanbd.conf.sample - ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - ${MV} ${STAGEDIR}${ETCDIR}/scripts ${STAGEDIR}${EXAMPLESDIR} + ${MV} ${STAGEDIR}${ETCDIR}/scripts/action.script ${STAGEDIR}${ETCDIR}/scripts/action.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/example.script ${STAGEDIR}${ETCDIR}/scripts/example.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/insert.script ${STAGEDIR}${ETCDIR}/scripts/insert.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/scanadf.script ${STAGEDIR}${ETCDIR}/scripts/scanadf.script.sample + ${MV} ${STAGEDIR}${ETCDIR}/scripts/test.script ${STAGEDIR}${ETCDIR}/scripts/test.script.sample ${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${WRKDIR}/scanbd ${STAGEDIR}${PREFIX}/etc/rc.d/scanbd .include diff --git a/sysutils/scanbd/files/patch-conf_scanbd.conf b/sysutils/scanbd/files/patch-conf_scanbd.conf index 7c786843d6ee..f08c92a6a4d3 100644 --- a/sysutils/scanbd/files/patch-conf_scanbd.conf +++ b/sysutils/scanbd/files/patch-conf_scanbd.conf @@ -1,38 +1,38 @@ ---- conf/scanbd.conf.orig 2023-06-18 13:49:49 UTC +--- conf/scanbd.conf.orig 2017-08-25 06:29:18 UTC +++ conf/scanbd.conf @@ -30,7 +30,7 @@ global { # debug logging # 1=error, 2=warn, 3=info, 4-7=debug - debug-level = 7 + debug-level = 2 # drop priviliges to this user #============================= @@ -52,12 +52,12 @@ global { # *BSD (no group lp here, use daemon instead) # group = daemon # root # - group = lp + group = saned # the saned executable for manager-mode - saned = "/usr/sbin/saned" -+ saned = "/usr/local/sbin/saned" ++ saned = "%%PREFIX%%/sbin/saned" saned_opt = {} # string-list - saned_env = { "SANE_CONFIG_DIR=/etc/scanbd" } # list of environment vars for saned -+ saned_env = { "SANE_CONFIG_DIR=/usr/local/etc/scanbd" } # list of environment vars for saned ++ saned_env = { "SANE_CONFIG_DIR=%%PREFIX%%/etc/scanbd" } # list of environment vars for saned # Scriptdir specifies where scanbd normally looks for scripts. # The scriptdir option can be defined as: @@ -68,8 +68,8 @@ global { # sets scriptdir to /etc/scanbd/scripts. # scriptdir = /some/path # sets scriptdir to the specified absolute path - # Default scriptdir is /etc/scanbd, this is normally appropriate - scriptdir = /etc/scanbd/scripts + # Default scriptdir is /etc/scanbd, this is normally -+ scriptdir = /usr/local/share/examples/scanbd/scripts ++ scriptdir = %%PREFIX%%/etc/scanbd/scripts # Scripts to execute upon device insertion/removal. # It can be necessary to load firmware into the device when it is first diff --git a/sysutils/scanbd/files/pkg-message.in b/sysutils/scanbd/files/pkg-message.in new file mode 100644 index 000000000000..773c4d4aae87 --- /dev/null +++ b/sysutils/scanbd/files/pkg-message.in @@ -0,0 +1,11 @@ +[ +{ type: install + message: <.sample. Copy and modify +these to suit your needs (or start from scratch). For details, see +%%PREFIX%%/etc/scanbd/scanbd.conf + +EOM +} +] diff --git a/sysutils/scanbd/pkg-plist b/sysutils/scanbd/pkg-plist index 8bd096a4e0a7..a5cf7d0bfcf4 100644 --- a/sysutils/scanbd/pkg-plist +++ b/sysutils/scanbd/pkg-plist @@ -1,17 +1,17 @@ -%%EXAMPLESDIR%%/scripts/action.script -%%EXAMPLESDIR%%/scripts/example.script -%%EXAMPLESDIR%%/scripts/insert.script -%%EXAMPLESDIR%%/scripts/scanadf.script -%%EXAMPLESDIR%%/scripts/test.script +%%ETCDIR%%/scripts/action.script.sample +%%ETCDIR%%/scripts/example.script.sample +%%ETCDIR%%/scripts/insert.script.sample +%%ETCDIR%%/scripts/scanadf.script.sample +%%ETCDIR%%/scripts/test.script.sample @sample %%ETCDIR%%/scanbd.conf.sample %%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