aboutsummaryrefslogtreecommitdiff
path: root/net/3proxy
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2005-10-28 07:16:04 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2005-10-28 07:16:04 +0000
commitf646ebc24a51dfc92d8a99bedccbf8c50e085569 (patch)
treef52901c1a7a7ea4001fb7064e5623a5e9d1e40fc /net/3proxy
parent4e02f8bb2b206217e061b5bde9c1c1be74fbb0d6 (diff)
downloadports-f646ebc24a51dfc92d8a99bedccbf8c50e085569.tar.gz
ports-f646ebc24a51dfc92d8a99bedccbf8c50e085569.zip
Notes
Diffstat (limited to 'net/3proxy')
-rw-r--r--net/3proxy/Makefile25
-rw-r--r--net/3proxy/distinfo4
-rw-r--r--net/3proxy/files/3proxy.sh19
-rw-r--r--net/3proxy/files/3proxy.sh.in29
-rw-r--r--net/3proxy/files/patch-Makefile.unix20
-rw-r--r--net/3proxy/files/patch-aa18
-rw-r--r--net/3proxy/files/patch-cfg-3proxy.cfg.sample (renamed from net/3proxy/files/patch-ab)18
-rw-r--r--net/3proxy/pkg-plist1
8 files changed, 81 insertions, 53 deletions
diff --git a/net/3proxy/Makefile b/net/3proxy/Makefile
index 2af30a074be6..521afa6e5b11 100644
--- a/net/3proxy/Makefile
+++ b/net/3proxy/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= 3proxy
-PORTVERSION= 0.4.5b
+PORTVERSION= 0.5.1b
CATEGORIES= net
MASTER_SITES= http://www.security.nnov.ru/soft/3proxy/${PORTVERSION}/
DISTNAME= ${PORTNAME}
@@ -17,22 +17,35 @@ COMMENT= Proxy servers set (support HTTP(S), FTP, SOCKS, POP3, TCP & UDP)
NO_WRKSUBDIR= yes
USE_REINPLACE= yes
+USE_RC_SUBR= yes
MAKEFILE= Makefile.unix
MAKE_ENV= CC="${CC}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}"
+
+MAN3= 3proxy.conf.3
+MAN8= 3proxy.8 ftppr.8 pop3p.8 proxy.8 socks.8 tcppm.8 udppm.8
+
+RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
+post-extract:
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/3proxy.sh.in > ${WRKSRC}/3proxy.sh
+
post-patch:
${REINPLACE_CMD} -e "s|%%CFLAGS%%|${CFLAGS}|" \
${WRKDIR}/Makefile.unix
do-install:
-.for i in 3proxy dighosts mycrypt pop3p proxy socks tcppm udppm
- ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/bin/
+.for i in 3proxy dighosts ftppr mycrypt pop3p proxy socks tcppm udppm
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${i} ${PREFIX}/bin/
.endfor
- ${INSTALL_DATA} ${WRKSRC}/3proxy.cfg.sample ${PREFIX}/etc
- ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" ${FILESDIR}/3proxy.sh \
- > ${WRKSRC}/3proxy.sh
+ ${INSTALL_DATA} ${WRKSRC}/cfg/3proxy.cfg.sample ${PREFIX}/etc
${INSTALL_SCRIPT} ${WRKSRC}/3proxy.sh ${PREFIX}/etc/rc.d/
+ ${INSTALL_MAN} ${WRKSRC}/man/${MAN3} ${PREFIX}/man/man3
+.for i in ${MAN8}
+ ${INSTALL_MAN} ${WRKSRC}/man/${i} ${PREFIX}/man/man8
+.endfor
post-install:
.if !defined(NOPORTDOCS)
diff --git a/net/3proxy/distinfo b/net/3proxy/distinfo
index 63763e15e273..863fdef25307 100644
--- a/net/3proxy/distinfo
+++ b/net/3proxy/distinfo
@@ -1,2 +1,2 @@
-MD5 (3proxy.tgz) = 3ba4bd370a3b9750b0444a15211832ca
-SIZE (3proxy.tgz) = 57496
+MD5 (3proxy.tgz) = 6f825cbbe060c9584d52585872043195
+SIZE (3proxy.tgz) = 180857
diff --git a/net/3proxy/files/3proxy.sh b/net/3proxy/files/3proxy.sh
deleted file mode 100644
index 72f337b3e7a9..000000000000
--- a/net/3proxy/files/3proxy.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-case "$1" in
-'start')
- %%PREFIX%%/bin/3proxy %%PREFIX%%/etc/3proxy.cfg \
- && echo -n " 3proxy" \
- || echo "3proxy startup failed"
- ;;
-
-'stop')
- /usr/bin/killall 3proxy
- ;;
-
-*)
- echo "Usage: ${0} { start | stop }"
- exit 1
- ;;
-esac
-exit 0
diff --git a/net/3proxy/files/3proxy.sh.in b/net/3proxy/files/3proxy.sh.in
new file mode 100644
index 000000000000..977bee5b3c4c
--- /dev/null
+++ b/net/3proxy/files/3proxy.sh.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: threeproxy
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Define these threeproxy_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/threeproxy
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+
+threeproxy_enable=${threeproxy_enable-"NO"}
+threeproxy_flags=${threeproxy_flags-"%%PREFIX%%/etc/3proxy.cfg"}
+
+. %%RC_SUBR%%
+
+name="threeproxy"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/3proxy"
+
+load_rc_config $name
+
+start_cmd="echo \"Starting ${name}.\"; ${command} ${threeproxy_flags}"
+
+run_rc_command "$1"
diff --git a/net/3proxy/files/patch-Makefile.unix b/net/3proxy/files/patch-Makefile.unix
new file mode 100644
index 000000000000..c5ff5f9c2b96
--- /dev/null
+++ b/net/3proxy/files/patch-Makefile.unix
@@ -0,0 +1,20 @@
+--- Makefile.unix.orig Mon May 30 11:14:05 2005
++++ Makefile.unix Mon May 30 11:15:25 2005
+@@ -6,13 +6,13 @@
+ # libraries
+
+
+-CC = gcc
++CC ?= gcc
+
+ # you may need -L/usr/pkg/lib for older NetBSD versions
+-CFLAGS = -Wall -g -O2 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
++CFLAGS = -Wall -c %%CFLAGS%% ${PTHREAD_CFLAGS} -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
+ COUT = -o
+-LN = gcc
+-LDFLAGS = -Wall -O2 -pthread
++LN ?= ${CC}
++LDFLAGS = -Wall ${PTHREAD_LIBS}
+ # -lpthreads may be reuqired on some platforms instead of -pthreads
+ LIBS =
+ LNOUT = -o
diff --git a/net/3proxy/files/patch-aa b/net/3proxy/files/patch-aa
deleted file mode 100644
index 421875ef6b3e..000000000000
--- a/net/3proxy/files/patch-aa
+++ /dev/null
@@ -1,18 +0,0 @@
---- Makefile.unix.orig Thu Oct 16 17:12:38 2003
-+++ Makefile.unix Fri Feb 13 18:16:29 2004
-@@ -3,11 +3,11 @@
- # 3 proxy Makefile for GCC/Unix/Linux/Cygwin
- #
-
--CC = gcc
--CFLAGS = -Wall -O2 -c -pthread -DNOODBC
-+CC ?= gcc
-+CFLAGS = -Wall -c -DNOODBC %%CFLAGS%% ${PTHREAD_CFLAGS}
- COUT = -o
--LN = gcc
--LDFLAGS = -Wall -O2 -pthread
-+LN ?= ${CC}
-+LDFLAGS = -Wall ${PTHREAD_LIBS}
- LIBS =
- LNOUT = -o
- EXESUFFICS =
diff --git a/net/3proxy/files/patch-ab b/net/3proxy/files/patch-cfg-3proxy.cfg.sample
index ce31aa87fcf1..cfa23df4daca 100644
--- a/net/3proxy/files/patch-ab
+++ b/net/3proxy/files/patch-cfg-3proxy.cfg.sample
@@ -1,20 +1,22 @@
---- 3proxy.cfg.sample.orig Fri Feb 13 18:09:36 2004
-+++ 3proxy.cfg.sample Fri Feb 13 18:11:20 2004
-@@ -341,14 +341,14 @@
+--- cfg/3proxy.cfg.sample.orig Mon May 30 11:16:19 2005
++++ cfg/3proxy.cfg.sample Mon May 30 11:17:18 2005
+@@ -30,15 +30,15 @@
# this example shows you how to include passwd file. For included files
# <CR> and <LF> are treated as field separators.
--service
-+#service
- # service is required under NT if you want 3proxy to start as service
-#daemon
+daemon
- # now we will not depend on any console (daemonize).
+ # now we will not depend on any console (daemonize). daemon must be given
+ # before any significant command on *nix.
+-service
++#service
+ # service is required under NT if you want 3proxy to start as service
- #log /usr/local/etc/3proxy/logs/3proxy.log D
+-#log /usr/local/etc/3proxy/logs/3proxy.log D
-log c:\3proxy\logs\3proxy.log D
+log /var/log/3proxy.log D
++#log c:\3proxy\logs\3proxy.log D
# log allows to specify log file location and rotation, D means logfile
# is created daily
diff --git a/net/3proxy/pkg-plist b/net/3proxy/pkg-plist
index 83838c855b6e..28f26b5dc8b7 100644
--- a/net/3proxy/pkg-plist
+++ b/net/3proxy/pkg-plist
@@ -1,5 +1,6 @@
bin/3proxy
bin/dighosts
+bin/ftppr
bin/mycrypt
bin/pop3p
bin/proxy