aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Walter <stefan@FreeBSD.org>2010-11-11 10:31:35 +0000
committerStefan Walter <stefan@FreeBSD.org>2010-11-11 10:31:35 +0000
commit920fca23ec730887b57aebff9bd89e87f15c894b (patch)
tree6aa10f576b885255902b28bbb99257f1e01ae9f3
parent9e4c114243166b6a582c2c808bb94732a6310ec8 (diff)
downloadports-920fca23ec730887b57aebff9bd89e87f15c894b.tar.gz
ports-920fca23ec730887b57aebff9bd89e87f15c894b.zip
Notes
-rw-r--r--GIDs1
-rw-r--r--UIDs1
-rw-r--r--net-p2p/uhub/Makefile23
-rw-r--r--net-p2p/uhub/files/uhub.sh.in10
4 files changed, 21 insertions, 14 deletions
diff --git a/GIDs b/GIDs
index a3aeb9efea8b..3ba9fb1ae90c 100644
--- a/GIDs
+++ b/GIDs
@@ -119,6 +119,7 @@ _iodined:*:353:
httptunnel:*:361:
ldap:*:389:
tiarra:*:398:
+uhub:*:411:
drweb:*:426:
callweaver:*:444:
courier:*:465:
diff --git a/UIDs b/UIDs
index 153abb84ed44..7658ac4577d5 100644
--- a/UIDs
+++ b/UIDs
@@ -129,6 +129,7 @@ _iodined:*:353:353::0:0:Iodine Daemon:/nonexistent:/usr/sbin/nologin
httptunnel:*:361:361::0:0:httptunnel Daemon:/nonexistent:/usr/sbin/nologin
ldap:*:389:389::0:0:OpenLDAP Server:/nonexistent:/usr/sbin/nologin
tiarra:*:398:398::0:0:Tiarra IRC Proxy:/nonexistent:/usr/sbin/nologin
+uhub:*:411:411::0:0:uHub ADC Daemon:/nonexistent:/usr/sbin/nologin
drweb:*:426:426::0:0:Dr.Web Mail Scanner:/nonexistent:/usr/sbin/nologin
callweaver:*:444:444::0:0:Callweaver account:/var/lib/callweaver:/usr/sbin/nologin
courier:*:465:465::0:0:Courier Mail Server:/nonexistent:/usr/sbin/nologin
diff --git a/net-p2p/uhub/Makefile b/net-p2p/uhub/Makefile
index a4e7c144315f..02bc02947cc2 100644
--- a/net-p2p/uhub/Makefile
+++ b/net-p2p/uhub/Makefile
@@ -7,7 +7,7 @@
PORTNAME= uhub
PORTVERSION= 0.3.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-p2p
MASTER_SITES= http://www.extatic.org/downloads/uhub/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
@@ -19,6 +19,10 @@ USE_PERL5_BUILD=yes
USE_GMAKE= yes
USE_RC_SUBR= uhub.sh
+USERS= uhub
+GROUPS= uhub
+SHAREGRP= uhub
+SHAREMODE= 640
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKEFILE= ${WRKSRC}/GNUmakefile
@@ -36,15 +40,18 @@ LDFLAGS+= -L${OPENSSLLIB}
post-patch:
@${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/doc/uhub.conf
+ @${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/src/uhub.h
-post-install:
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/uhub ${PREFIX}/bin/uhub
+ @${MKDIR} ${PREFIX}/etc/uhub
@${INSTALL_DATA} ${WRKSRC}/doc/uhub.conf ${PREFIX}/etc/uhub/uhub.conf.sample
@${INSTALL_DATA} ${WRKSRC}/doc/users.conf ${PREFIX}/etc/uhub/users.conf.sample
- @if [ -f ${PREFIX}/etc/uhub/motd.txt ]; then \
- ${TOUCH} ${PREFIX}/etc/uhub/motd.txt.sample ; \
- fi
- @if [ -f ${PREFIX}/etc/uhub/rules.txt ]; then \
- ${TOUCH} ${PREFIX}/etc/uhub/rules.txt.sample ; \
- fi
+ @${INSTALL_DATA} /dev/null ${PREFIX}/etc/uhub/motd.txt.sample
+ @${INSTALL_DATA} /dev/null ${PREFIX}/etc/uhub/rules.txt.sample
+.for i in uhub.conf users.conf motd.txt rules.txt
+ @[ ! -f ${PREFIX}/etc/uhub/${i} ] \
+ && cp -p ${PREFIX}/etc/uhub/${i}.sample ${PREFIX}/etc/uhub/${i}
+.endfor
.include <bsd.port.post.mk>
diff --git a/net-p2p/uhub/files/uhub.sh.in b/net-p2p/uhub/files/uhub.sh.in
index 7cfd522dde1c..7f8167b5b497 100644
--- a/net-p2p/uhub/files/uhub.sh.in
+++ b/net-p2p/uhub/files/uhub.sh.in
@@ -11,8 +11,6 @@
#
# uhub_enable (bool): Set it to "YES" to enable uhub
# Default is "NO".
-# uhub_conf (path): Set full path to config file.
-# Default is "%%PREFIX%%/etc/uhub/uhub.conf".
# uhub_pidfile (path): Set full path to pid file.
# Default is "/var/run/uhub.pid".
#
@@ -24,12 +22,12 @@ rcvar=`set_rcvar`
load_rc_config $name
-: ${uhub_enable="NO"}
-: ${uhub_conf="%%PREFIX%%/etc/uhub/uhub.conf"}
-: ${uhub_pidfile="/var/run/${name}.pid"}
+: ${uhub_enable:="NO"}
+: ${uhub_flags:="-L -u uhub -g uhub"}
+: ${uhub_pidfile:="/var/run/${name}.pid"}
command=%%PREFIX%%/bin/uhub
-command_args="-fq -c ${uhub_conf} -p ${uhub_pidfile}"
+command_args="-f -p ${uhub_pidfile}"
pidfile=${uhub_pidfile}
required_files=${uhub_conf}
stop_postcmd=stop_postcmd