aboutsummaryrefslogtreecommitdiff
path: root/devel/cvsd
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2006-06-06 09:33:07 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2006-06-06 09:33:07 +0000
commitc47590bf087f05a56b78f89b3f5b2e100a2c14f4 (patch)
tree1633aff78c2e1d844478a486f89a215d5831d9b5 /devel/cvsd
parent54c631b2bb33d54b13ee944a38b3eaef1133e819 (diff)
downloadports-c47590bf087f05a56b78f89b3f5b2e100a2c14f4.tar.gz
ports-c47590bf087f05a56b78f89b3f5b2e100a2c14f4.zip
Notes
Diffstat (limited to 'devel/cvsd')
-rw-r--r--devel/cvsd/Makefile17
-rw-r--r--devel/cvsd/files/cvsd.sh.in52
-rw-r--r--devel/cvsd/files/extra-cvsd-buildroot.in42
3 files changed, 106 insertions, 5 deletions
diff --git a/devel/cvsd/Makefile b/devel/cvsd/Makefile
index 35c0b42cf091..045710059b64 100644
--- a/devel/cvsd/Makefile
+++ b/devel/cvsd/Makefile
@@ -8,10 +8,11 @@
PORTNAME= cvsd
PORTVERSION= 1.0.12
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://ch.tudelft.nl/~arthur/cvsd/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= bu7cher@yandex.ru
COMMENT= CVS pserver daemon
USE_GPG?= yes
@@ -27,16 +28,22 @@ MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
MAN5= cvsd.conf.5
MAN8= cvsd.8 cvsd-buginfo.8 cvsd-buildroot.8 cvsd-passwd.8
PORTDOCS= README
-PLIST_FILES= etc/cvsd/cvsd.conf.sample etc/rc.d/cvsd.sh.sample \
- sbin/cvsd sbin/cvsd-buginfo sbin/cvsd-buildroot sbin/cvsd-passwd
+PLIST_FILES= etc/cvsd/cvsd.conf.sample sbin/cvsd sbin/cvsd-buginfo \
+ sbin/cvsd-buildroot sbin/cvsd-passwd
PLIST_DIRS= etc/cvsd
+USE_RC_SUBR= cvsd.sh
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} > 500000
+EXTRA_PATCHES+= ${FILESDIR}/extra-cvsd-buildroot.in
+.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/cvsd ${PREFIX}/sbin/cvsd
.for FILE in cvsd-buginfo cvsd-buildroot cvsd-passwd
${INSTALL_SCRIPT} ${WRKSRC}/${FILE} ${PREFIX}/sbin
.endfor
- ${INSTALL_DATA} ${WRKSRC}/cvsd.init ${PREFIX}/etc/rc.d/cvsd.sh.sample
@${MKDIR} ${PREFIX}/etc/cvsd
${INSTALL_DATA} ${WRKSRC}/cvsd.conf-dist ${PREFIX}/etc/cvsd/cvsd.conf.sample
.for FILE in ${MAN5}
@@ -51,4 +58,4 @@ do-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/devel/cvsd/files/cvsd.sh.in b/devel/cvsd/files/cvsd.sh.in
new file mode 100644
index 000000000000..dac4508f67cb
--- /dev/null
+++ b/devel/cvsd/files/cvsd.sh.in
@@ -0,0 +1,52 @@
+#!/bin/sh
+# $FreeBSD:
+#
+# PROVIDE: cvsd
+# REQUIRE: NETWORKING
+# KEYWORD: nojail
+
+. %%RC_SUBR%%
+
+name="cvsd"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/$name"
+
+load_rc_config $name
+
+: ${cvsd_enable="NO"}
+: ${cvsd_config="%%PREFIX%%/etc/$name/$name.conf"}
+
+command_args="-f $cvsd_config"
+
+start_precmd="cvsd_prestart"
+stop_postcmd="cvsd_poststop"
+
+cvsd_prestart()
+{
+ if [ $osreldate -gt 500000 ]; then
+ mount -t devfs devfs $jail/dev
+ devfs -m $jail/dev rule apply hide
+ devfs -m $jail/dev rule apply path null unhide
+ devfs -m $jail/dev rule apply path zero unhide
+ fi
+}
+
+cvsd_poststop()
+{
+ if [ $osreldate -gt 500000 ]; then
+ umount -t devfs $jail/dev
+ fi
+}
+
+jail=`sed -n 's/^ *RootJail *\([^ ]*\) *$/\1/p' < $cvsd_config`
+pidfile=`sed -n 's/^ *PidFile *\([^ ]*\) *$/\1/p' < $cvsd_config`
+osreldate=`sysctl -n kern.osreldate`
+if [ "$jail" = "X$jail" ]; then
+ err 1 "RootJail is not specified in $cvsd_config"
+fi
+if [ "$pidfile" = "X$pidfile" ]; then
+ err 1 "PidFile is not specified in $cvsd_config"
+fi
+
+run_rc_command "$1"
+
diff --git a/devel/cvsd/files/extra-cvsd-buildroot.in b/devel/cvsd/files/extra-cvsd-buildroot.in
new file mode 100644
index 000000000000..6e7ed4b33e1b
--- /dev/null
+++ b/devel/cvsd/files/extra-cvsd-buildroot.in
@@ -0,0 +1,42 @@
+--- cvsd-buildroot.in.orig Thu Jun 1 23:57:20 2006
++++ cvsd-buildroot.in Tue Jun 6 11:38:57 2006
+@@ -212,39 +212,6 @@
+ fi
+ done
+
+-# populate /dev (need root privileges for this)
+-echo $ECHO_N "creating $ROOT/dev devices... $ECHO_C"
+-DEVICES="null zero"
+-MISSINGDEVS=""
+-for d in $DEVICES
+-do
+- if [ -r "$ROOT/dev/$d" ]
+- then
+- :
+- else
+- MISSINGDEVS="$MISSINGDEVS $d"
+- fi
+-done
+-if [ -n "`echo $MISSINGDEVS`" ]
+-then
+- if (cd /dev ; tar chpf - $MISSINGDEVS) | \
+- ( cd "$ROOT/dev" ; tar xpf - > /dev/null 2>&1 )
+- then
+- # check if we can use the devices
+- if ( echo TEST > "$ROOT/dev/null" && \
+- echo TEST > "$ROOT/dev/zero" ) 2> /dev/null
+- then
+- echo "done."
+- else
+- echo "FAILED (unable to use devices)"
+- fi
+- else
+- echo "FAILED."
+- fi
+-else
+- echo "already there."
+-fi
+-
+ # update /etc/passwd
+ echo $ECHO_N "adding users to $ROOT/etc/passwd...$ECHO_C"
+ for i in $USERS