aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-04-02 19:39:10 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-04-02 19:39:10 +0000
commitfba09a1864f8c54ed3c430bb141a254d3aecd35c (patch)
tree5a25ff76ffb165712af9ad2bf345346bba3504f3 /net
parent46428576856190cdc391130d108c953874831b8e (diff)
downloadports-fba09a1864f8c54ed3c430bb141a254d3aecd35c.tar.gz
ports-fba09a1864f8c54ed3c430bb141a254d3aecd35c.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/socks5/Makefile9
-rw-r--r--net/socks5/files/socks5.sh.sample20
-rw-r--r--net/socks5/pkg-plist1
3 files changed, 28 insertions, 2 deletions
diff --git a/net/socks5/Makefile b/net/socks5/Makefile
index a81d1faa9f1c..b5a25d6be958 100644
--- a/net/socks5/Makefile
+++ b/net/socks5/Makefile
@@ -7,7 +7,7 @@
PORTNAME= socks5
PORTVERSION= 1.0.11
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net security
DISTNAME= socks5-v1.0r11
@@ -32,13 +32,18 @@ CONFIGURE_ARGS= --with-libconffile=${PREFIX}/etc/libsocks5.conf \
--with-srvconffile=${PREFIX}/etc/socks5.conf \
--with-srvpidfile=/var/run/socks5.pid \
--with-srvidtfile=/var/run/socks5.ident \
+ --with-srvpwdfile=${PREFIX}/etc/socks5.passwd \
${EXTRA_CONFIGURE_ARGS}
MAN1= runsocks.1 socks5.1 stopsocks.1 socks5_clients.1
MAN5= libsocks5.conf.5 socks5.conf.5 socks5.passwd.5
CONFIGURE_ENV= LIBS=-lcrypt
-.if !defined(NOPORTDOCS)
post-install:
+ @if [ ! -f ${PREFIX}/etc/rc.d/socks5.sh ]; then \
+ ${ECHO} "Creating ${PREFIX}/etc/rc.d/socks5.sh startup file."; \
+ ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/socks5.sh.sample ${PREFIX}/etc/rc.d/socks5.sh; \
+ fi
+.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
@${MKDIR} ${DOCSDIR}
diff --git a/net/socks5/files/socks5.sh.sample b/net/socks5/files/socks5.sh.sample
new file mode 100644
index 000000000000..8f7373563771
--- /dev/null
+++ b/net/socks5/files/socks5.sh.sample
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ [ -x ${PREFIX}/bin/socks5 ] && ${PREFIX}/bin/socks5 && echo -n ' socks5'
+ ;;
+stop)
+ killall socks5 && echo -n ' socks5'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
diff --git a/net/socks5/pkg-plist b/net/socks5/pkg-plist
index 3ee9d11bbfe3..caacd822b1e4 100644
--- a/net/socks5/pkg-plist
+++ b/net/socks5/pkg-plist
@@ -1,3 +1,4 @@
+etc/rc.d/socks5.sh
bin/socks5
bin/runsocks
bin/stopsocks