View | Details | Raw Unified | Return to bug 272066
Collapse All | Expand All

(-)b/sysutils/scanbd/Makefile (-2 / +10 lines)
Lines 1-5 Link Here
1
PORTNAME=	scanbd
1
PORTNAME=	scanbd
2
DISTVERSION=	1.5.1
2
DISTVERSION=	1.5.1
3
PORTREVISION=	1
3
CATEGORIES=	sysutils
4
CATEGORIES=	sysutils
4
5
5
MAINTAINER=	trueos@norwegianrockcat.com
6
MAINTAINER=	trueos@norwegianrockcat.com
Lines 24-38 GL_COMMIT= 4503640d202c06510f21848a684e221f613f324b Link Here
24
25
25
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
26
27
27
CONFIGURE_ARGS+=	--with-user --with-group
28
CONFIGURE_ARGS+=	--with-user=saned --with-group=saned
28
29
29
SHEBANG_GLOB= *.script
30
SHEBANG_GLOB=	*.script
30
31
31
USE_RC_SUBR=	scanbd
32
USE_RC_SUBR=	scanbd
32
33
33
SUB_FILES=	scanbd
34
SUB_FILES=	scanbd
34
35
36
post-patch:
37
	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/conf/scanbd.conf
38
35
post-install:
39
post-install:
40
	${MV} ${STAGEDIR}${ETCDIR}/scanbd.conf ${STAGEDIR}${ETCDIR}/scanbd.conf.sample
41
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
42
	${MV} ${STAGEDIR}${ETCDIR}/scripts ${STAGEDIR}${EXAMPLESDIR}
43
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.d
36
	${INSTALL_SCRIPT} ${WRKDIR}/scanbd ${STAGEDIR}${PREFIX}/etc/rc.d/scanbd
44
	${INSTALL_SCRIPT} ${WRKDIR}/scanbd ${STAGEDIR}${PREFIX}/etc/rc.d/scanbd
37
45
38
.include <bsd.port.mk>
46
.include <bsd.port.mk>
(-)b/sysutils/scanbd/files/patch-conf_scanbd.conf (+38 lines)
Added Link Here
1
--- conf/scanbd.conf.orig	2023-06-18 13:49:49 UTC
2
+++ conf/scanbd.conf
3
@@ -30,7 +30,7 @@ global {
4
 
5
         # debug logging
6
         # 1=error, 2=warn, 3=info, 4-7=debug
7
-        debug-level = 7
8
+        debug-level = 2
9
         
10
         # drop priviliges to this user
11
         #=============================
12
@@ -52,12 +52,12 @@ global {
13
         # *BSD (no group lp here, use daemon instead)
14
         # group   = daemon # root
15
         #
16
-        group   = lp
17
+        group   = saned
18
 
19
         # the saned executable for manager-mode
20
-        saned   = "/usr/sbin/saned"
21
+        saned   = "/usr/local/sbin/saned"
22
         saned_opt  = {} # string-list
23
-		saned_env  = { "SANE_CONFIG_DIR=/etc/scanbd" } # list of environment vars for saned
24
+		saned_env  = { "SANE_CONFIG_DIR=/usr/local/etc/scanbd" } # list of environment vars for saned
25
 
26
         # Scriptdir specifies where scanbd normally looks for scripts.
27
         # The scriptdir option can be defined as: 
28
@@ -68,8 +68,8 @@ global {
29
         # sets scriptdir to <path>/etc/scanbd/scripts.
30
         # scriptdir = /some/path
31
         # sets scriptdir to the specified absolute path
32
-        # Default scriptdir is <path>/etc/scanbd, this is normally appropriate
33
-		scriptdir = /etc/scanbd/scripts
34
+        # Default scriptdir is <path>/etc/scanbd, this is normally
35
+        scriptdir = /usr/local/share/examples/scanbd/scripts
36
         
37
         # Scripts to execute upon device insertion/removal.
38
         # It can be necessary to load firmware into the device when it is first
(-)b/sysutils/scanbd/files/scanbd.in (-5 / +19 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# PROVIDE: scanbd
2
# PROVIDE: scanbd
3
# REQUIRE: DAEMON FILESYSTEMS dbus
3
# REQUIRE: DAEMON FILESYSTEMS LOGIN dbus
4
# KEYWORD:
4
# KEYWORD: shutdown
5
#
6
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
7
# to enable the service
8
# scanbd_enable (bool):     Set to NO by default.
9
#                           Set to YES to enable scanbd.
10
# scanbd_config (path):     set to %%PREFIX%%/etc/scanbd/scanbd.conf
11
#                           by default
12
5
13
6
. /etc/rc.subr
14
. /etc/rc.subr
7
15
8
name=scanbd
16
name=scanbd
9
# scanbd_user=saned  # Fix this
17
desc="Scanbd: Scan button Daemon"
10
rcvar=scanbd_enable
18
rcvar=scanbd_enable
11
command_args=""
12
command="%%PREFIX%%/sbin/${name}"
13
19
14
load_rc_config $name
20
load_rc_config $name
21
22
: ${scanbd_enable:=NO}
23
: ${scanbd_config="%%PREFIX%%/etc/scanbd/scanbd.conf"}
24
25
command_args="-c $scanbd_config"
26
command="%%PREFIX%%/sbin/${name}" 
27
28
15
run_rc_command "$1"
29
run_rc_command "$1"
16
30
(-)b/sysutils/scanbd/pkg-plist (-7 / +6 lines)
Lines 1-9 Link Here
1
%%ETCDIR%%/scripts/action.script
1
%%EXAMPLESDIR%%/scripts/action.script
2
%%ETCDIR%%/scripts/example.script
2
%%EXAMPLESDIR%%/scripts/example.script
3
%%ETCDIR%%/scripts/insert.script
3
%%EXAMPLESDIR%%/scripts/insert.script
4
%%ETCDIR%%/scripts/scanadf.script
4
%%EXAMPLESDIR%%/scripts/scanadf.script
5
%%ETCDIR%%/scripts/test.script
5
%%EXAMPLESDIR%%/scripts/test.script
6
%%ETCDIR%%/scanbd.conf
6
@sample %%ETCDIR%%/scanbd.conf.sample
7
%%ETCDIR%%/scanner.d/avision.conf
7
%%ETCDIR%%/scanner.d/avision.conf
8
%%ETCDIR%%/scanner.d/canon.conf
8
%%ETCDIR%%/scanner.d/canon.conf
9
%%ETCDIR%%/scanner.d/fujitsu.conf
9
%%ETCDIR%%/scanner.d/fujitsu.conf
10
- 

Return to bug 272066