aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/frox
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-01-19 16:16:22 +0800
committerkrion <krion@FreeBSD.org>2004-01-19 16:16:22 +0800
commit3843787614944448e84bd33005b824563ae13a1f (patch)
treea93258f5b70dae0e3b990a06b1bfe4cc9bd057ef /ftp/frox
parentcb9a5bf69befa42436e7987bdaa51e40cbb97481 (diff)
downloadfreebsd-ports-gnome-3843787614944448e84bd33005b824563ae13a1f.tar.gz
freebsd-ports-gnome-3843787614944448e84bd33005b824563ae13a1f.tar.zst
freebsd-ports-gnome-3843787614944448e84bd33005b824563ae13a1f.zip
- Update to 0.7.12
- use rcNG script - make configure script happy with CONFIGURE_TARGET - use PORTDOCS to autoaddition docs in PLIST PR: 61561 Submitted by: maintainer
Diffstat (limited to 'ftp/frox')
-rw-r--r--ftp/frox/Makefile30
-rw-r--r--ftp/frox/distinfo2
-rw-r--r--ftp/frox/files/frox.sh71
-rw-r--r--ftp/frox/pkg-message5
-rw-r--r--ftp/frox/pkg-plist5
5 files changed, 74 insertions, 39 deletions
diff --git a/ftp/frox/Makefile b/ftp/frox/Makefile
index cd0130894020..19390531bffe 100644
--- a/ftp/frox/Makefile
+++ b/ftp/frox/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= frox
-PORTVERSION= 0.7.11
+PORTVERSION= 0.7.12
CATEGORIES= ftp
MASTER_SITES= http://www.hollo.org/frox/download/ \
http://frox.sourceforge.net/download/ \
@@ -19,11 +19,22 @@ COMMENT= Transparent FTP proxy with caching support
USE_BZIP2= yes
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'
+
+PLIST_SUB+= RC_DIR=${RC_DIR} RC_SUFX=${RC_SUFX}
MAN1= frox.1
MAN5= frox.conf.5
-DOCS= FAQ SECURITY CREDITS ChangeLog
+PORTDOCS= FAQ SECURITY CREDITS ChangeLog
PKGMESSAGE= ${WRKDIR}/pkg-message
@@ -63,7 +74,8 @@ pre-fetch:
@${ECHO_MSG} ""
pre-patch:
- @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message >${PKGMESSAGE}
+ @${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
@@ -74,15 +86,13 @@ do-install:
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
-.for f in ${DOCS}
+.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}
.endfor
.endif
- @${STRIP_CMD} ${PREFIX}/sbin/frox
- @if [ ! -f ${PREFIX}/etc/rc.d/${PORTNAME}.sh ]; then \
- ${ECHO_MSG} "Install ${PREFIX}/etc/rc.d/${PORTNAME}.sh startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh; \
- fi
- @${CAT} ${PKGMESSAGE}
+ @${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.mk>
diff --git a/ftp/frox/distinfo b/ftp/frox/distinfo
index 50e879ee33d4..45ad98d893e8 100644
--- a/ftp/frox/distinfo
+++ b/ftp/frox/distinfo
@@ -1 +1 @@
-MD5 (frox-0.7.11.tar.bz2) = 1e35825e4ef0e080fc5927271532a818
+MD5 (frox-0.7.12.tar.bz2) = 30b3af5bc8cfdb0c751e02f03a69615d
diff --git a/ftp/frox/files/frox.sh b/ftp/frox/files/frox.sh
index e83d121716e6..bc8fc02fbf19 100644
--- a/ftp/frox/files/frox.sh
+++ b/ftp/frox/files/frox.sh
@@ -1,23 +1,52 @@
#!/bin/sh
+#
+# $FreeBSD$
+#
-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}/sbin/frox -a -f ${PREFIX}/etc/frox.conf ]
- ! grep -iq '^[[:space:]]*frominetd[[:space:]]*yes' ${PREFIX}/etc/frox.conf && \
- ${PREFIX}/sbin/frox && \
- echo -n ' frox'
- ;;
-stop)
- [ -f /var/run/frox.pid ] && kill `cat /var/run/frox.pid` && echo -n ' frox'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
-
-exit 0
+# PROVIDE: frox
+# REQUIRE: NETWORKING
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable frox:
+#
+#frox_enable="YES"
+#
+# See frox(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=frox
+rcvar=`set_rcvar`
+
+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
+}
+
+# set defaults
+
+frox_enable=${frox_enable:-"NO"}
+frox_flags=${frox_flags:-""}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/ftp/frox/pkg-message b/ftp/frox/pkg-message
index 29df0f579dd7..31906c7bfab9 100644
--- a/ftp/frox/pkg-message
+++ b/ftp/frox/pkg-message
@@ -1,8 +1,9 @@
**************************************************************************
NOTES:
Don't forget to create %%PREFIX%%/etc/frox.conf
-from %%PREFIX%%/etc/frox.conf.sample and then run frox by
-%%PREFIX%%/etc/rc.d/frox.sh start
+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
diff --git a/ftp/frox/pkg-plist b/ftp/frox/pkg-plist
index c4abd85381a0..52238638a9e7 100644
--- a/ftp/frox/pkg-plist
+++ b/ftp/frox/pkg-plist
@@ -1,8 +1,3 @@
sbin/frox
etc/frox.conf.sample
etc/rc.d/frox.sh
-%%PORTDOCS%%%%DOCSDIR%%/FAQ
-%%PORTDOCS%%%%DOCSDIR%%/SECURITY
-%%PORTDOCS%%%%DOCSDIR%%/CREDITS
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%@dirrm %%DOCSDIR%%