aboutsummaryrefslogtreecommitdiff
path: root/ftp/frox
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2006-02-07 12:50:29 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2006-02-07 12:50:29 +0000
commit346ee7892f9580ed9657707e83d0f466e5323b9b (patch)
tree4e84a7ce4a75c0795dcbf41b2f7b3482b39036b3 /ftp/frox
parent2fb9fbd8a1ad3a10c22a18bb31d154efa07cf248 (diff)
downloadports-346ee7892f9580ed9657707e83d0f466e5323b9b.tar.gz
ports-346ee7892f9580ed9657707e83d0f466e5323b9b.zip
Notes
Diffstat (limited to 'ftp/frox')
-rw-r--r--ftp/frox/Makefile26
-rw-r--r--ftp/frox/files/frox.sh.in (renamed from ftp/frox/files/frox.sh)14
-rw-r--r--ftp/frox/files/pkg-message.in15
-rw-r--r--ftp/frox/pkg-descr3
-rw-r--r--ftp/frox/pkg-message14
5 files changed, 25 insertions, 47 deletions
diff --git a/ftp/frox/Makefile b/ftp/frox/Makefile
index 410d059ff8a7..62bea084ece0 100644
--- a/ftp/frox/Makefile
+++ b/ftp/frox/Makefile
@@ -21,23 +21,17 @@ USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-USE_RC_SUBR= yes
-RC_DIR?= ${PREFIX}/etc/rc.d
-RC_SUFX?= .sh
-SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
- -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
- -e 's|%%RC_DIR%%|${RC_DIR}|g' \
- -e 's|%%RC_SUFX%%|${RC_SUFX}|g'
+USE_RC_SUBR= frox.sh
+SUB_FILES= pkg-message
-PLIST_SUB+= RC_DIR=${RC_DIR} RC_SUFX=${RC_SUFX}
-
-MAN1= frox.1
-MAN5= frox.conf.5
+MAN1= frox.1
+MAN5= frox.conf.5
PORTDOCS= SECURITY CREDITS ChangeLog FAQ.html FAQ-1.html FAQ-2.html \
FAQ-3.html FAQ-4.html FAQ-5.html FAQ-6.html FAQ-7.html \
FAQ-8.html
-PLIST_FILES= sbin/frox etc/frox.conf.sample etc/rc.d/frox.sh
+PLIST_FILES= sbin/frox ${EXAMPLESDIR:S,${PREFIX}/,,}/frox.conf
+PLIST_DIRS= ${EXAMPLESDIR:S,${PREFIX}/,,}
PKGMESSAGE= ${WRKDIR}/pkg-message
@@ -78,13 +72,10 @@ CONFIGURE_ARGS+= --enable-ccp
CONFIGURE_ARGS+= --enable-run-as-root
.endif
-pre-patch:
- @${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-message >${PKGMESSAGE}
- @${SED} ${SED_SCRIPT} ${FILESDIR}/frox.sh > ${WRKDIR}/frox.sh
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/frox ${PREFIX}/sbin
- ${INSTALL_DATA} ${WRKSRC}/src/frox.conf ${PREFIX}/etc/frox.conf.sample
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/src/frox.conf ${EXAMPLESDIR}/frox.conf
${INSTALL_MAN} ${WRKSRC}/doc/frox.man ${PREFIX}/man/man1/frox.1
${INSTALL_MAN} ${WRKSRC}/doc/frox.conf.man ${PREFIX}/man/man5/frox.conf.5
@@ -97,7 +88,6 @@ post-install:
.endif
@${STRIP_CMD} ${PREFIX}/sbin/frox; \
${ECHO_MSG} "Install ${RC_DIR}/frox${RC_SUFX} startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/frox.sh ${RC_DIR}/frox${RC_SUFX}; \
${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/ftp/frox/files/frox.sh b/ftp/frox/files/frox.sh.in
index bc8fc02fbf19..b2ce5678859e 100644
--- a/ftp/frox/files/frox.sh
+++ b/ftp/frox/files/frox.sh.in
@@ -5,7 +5,7 @@
# PROVIDE: frox
# REQUIRE: NETWORKING
-# KEYWORD: FreeBSD shutdown
+# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable frox:
@@ -24,20 +24,8 @@ command=%%PREFIX%%/sbin/frox
pidfile=/var/run/frox.pid
required_files=%%PREFIX%%/etc/frox.conf
-start_precmd=start_precmd
stop_postcmd=stop_postcmd
-# if require start from inetd?
-start_precmd()
-{
- if grep -iq '^[[:space:]]*frominetd[[:space:]]*yes' %%PREFIX%%/etc/frox.conf;
- then
- return 1
- else
- return 0
- fi
-}
-
stop_postcmd()
{
rm -f $pidfile
diff --git a/ftp/frox/files/pkg-message.in b/ftp/frox/files/pkg-message.in
new file mode 100644
index 000000000000..58c02d5fd0ff
--- /dev/null
+++ b/ftp/frox/files/pkg-message.in
@@ -0,0 +1,15 @@
+**************************************************************************
+Don't forget to create %%PREFIX%%/etc/frox.conf.
+See an example in %%EXAMPLESDIR%%/frox.conf
+
+You can use frox by two ways:
+1) run as a daemon:
+Add `frox_enable="YES"' in /etc/rc.conf and run %%PREFIX%%/etc/rc.d/frox.sh
+
+2) run frox with inetd(8):
+* uncomment 'FromInetd yes' in your %%PREFIX%%/etc/frox.conf
+* add a line in /etc/inetd.conf:
+frox stream tcp nowait nobody %%PREFIX%%/sbin/frox frox
+* assign a port number for frox inside /etc/services (e.g. 2121):
+frox 2121/tcp
+**************************************************************************
diff --git a/ftp/frox/pkg-descr b/ftp/frox/pkg-descr
index ca6c38f01384..3a18c1209785 100644
--- a/ftp/frox/pkg-descr
+++ b/ftp/frox/pkg-descr
@@ -2,8 +2,7 @@ This is frox, a transparent ftp proxy by James Hollingshead.
Current features include:
- o rfc959 compliant (I think) transparent proxying of ftp
- connections.
+ o rfc959 compliant transparent proxying of ftp connections.
o active --> passive mode conversion for data connections.
o Optional caching support either locally or through an external
HTTP cache.
diff --git a/ftp/frox/pkg-message b/ftp/frox/pkg-message
deleted file mode 100644
index 31906c7bfab9..000000000000
--- a/ftp/frox/pkg-message
+++ /dev/null
@@ -1,14 +0,0 @@
-**************************************************************************
-NOTES:
-Don't forget to create %%PREFIX%%/etc/frox.conf
-from %%PREFIX%%/etc/frox.conf.sample.
-Then add `frox_enable="YES"' in /etc/rc.conf and run frox with
-%%RC_DIR%%/frox%%RC_SUFX%% start
-
-Or you can run frox with inetd this way:
-* uncomment 'FromInetd yes' in your %%PREFIX%%/etc/frox.conf
-* add this line in /etc/inetd.conf:
-frox stream tcp nowait nobody %%PREFIX%%/sbin/frox frox
-* and assign port number for frox you want in /etc/services (e.g. 2121):
-frox 2121/tcp
-**************************************************************************