ports/71370: ports update net/delegate to 8.9.5

NAKAMURA Takeshi ta.nakamura at crs.co.jp
Sat Sep 4 15:28:21 UTC 2004


I'm miss taken.

I maade new patch. Please use to new one.
rcNg and BATCH mode support.


Index: Makefile
===================================================================
RCS file: /export/cvs/FreeBSD/ncvs/ports/net/delegate/Makefile,v
retrieving revision 1.48
diff -u -r1.48 Makefile
--- Makefile	12 May 2004 14:15:11 -0000	1.48
+++ Makefile	4 Sep 2004 15:07:39 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	delegate
-PORTVERSION=	8.9.3
+PORTVERSION=	8.9.5
 CATEGORIES=	net www
 MASTER_SITES=	ftp://www.delegate.org/pub/DeleGate/ \
 		ftp://ftp.delegate.org/pub/DeleGate/
@@ -16,9 +16,21 @@
 COMMENT=	General purpose TCP/IP proxy system
 
 USE_BZIP2=	yes
-IS_INTERACTIVE=	YES
 PORTDOCS=	Manual.htm tutor-jp.htm tutor-en.htm
-PLIST_FILES=	sbin/delegated etc/rc.d/delegated.sh-dist
+PLIST_FILES=	"@unexec ${PREFIX}/etc/rc.d/delegated.sh stop || exit 0" \
+		sbin/delegated etc/rc.d/delegated.sh
+
+USE_RC_SUBR=    yes
+
+.if defined(BATCH) && ! defined(ADMIN)
+ADMIN=	root@`hostname`
+.endif
+
+.if defined(ADMIN)
+SED_ADMIN=	s/\(ADMIN=\)delegate-master at your.host.domain/\1${ADMIN}/
+.else
+SED_ADMIN=
+.endif
 
 pre-everything::
 .if !defined(FORCE_BUILD) || ${FORCE_BUILD}!="YES"
@@ -45,10 +57,24 @@
 	@${ECHO_MSG} "*********************************************************************"
 .endif
 
+post-extract:
+.	if defined(ADMIN)
+		${CP} ${WRKSRC}/src/Makefile ${WRKSRC}/src/Makefile.orig
+		${SED} "s/^\(ADMIN = \)undef/\1${ADMIN}/" \
+			${WRKSRC}/src/Makefile.orig > ${WRKSRC}/src/Makefile
+.	else
+		@${ECHO_MSG} 'You can set the ADMIN.'
+		@${ECHO_MSG} 'looks like "make ADMIN=your-name at hostname.example.net"'
+.	endif
+	${SED} -e "s@%%PREFIX%%@${PREFIX}@" \
+		-e "s@%%RC_SUBR%%@${RC_SUBR}@" \
+		-e "${SED_ADMIN}" \
+		${FILESDIR}/delegated.sh > ${WRKSRC}/delegated.sh
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/delegated ${PREFIX}/sbin
-	${INSTALL_SCRIPT} ${FILESDIR}/delegated.sh \
-	   ${PREFIX}/etc/rc.d/delegated.sh-dist
+	${INSTALL_SCRIPT} ${WRKSRC}/delegated.sh \
+	   ${PREFIX}/etc/rc.d/
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 .for f in ${PORTDOCS}
Index: distinfo
===================================================================
RCS file: /export/cvs/FreeBSD/ncvs/ports/net/delegate/distinfo,v
retrieving revision 1.35
diff -u -r1.35 distinfo
--- distinfo	12 May 2004 14:15:12 -0000	1.35
+++ distinfo	28 Jul 2004 09:07:37 -0000
@@ -1,2 +1,2 @@
-MD5 (delegate8.9.3.tar.bz2) = 5262733716bef96126702a4defe2c3d6
-SIZE (delegate8.9.3.tar.bz2) = 971292
+MD5 (delegate8.9.5.tar.bz2) = 54319079fc723b54010db9f7f2af5356
+SIZE (delegate8.9.5.tar.bz2) = 977960
Index: pkg-message
===================================================================
RCS file: /export/cvs/FreeBSD/ncvs/ports/net/delegate/pkg-message,v
retrieving revision 1.8
diff -u -r1.8 pkg-message
--- pkg-message	21 Feb 2004 20:12:10 -0000	1.8
+++ pkg-message	4 Sep 2004 09:30:11 -0000
@@ -8,8 +8,7 @@
 *********************************************************************
 
 ----------------------------------------------------------------------
-Now, edit the sample script in /usr/local/share/examples/delegate directory
-and copy it into /usr/local/etc/rc.d.
+Now, edit the sample script in /usr/local/etc/rc.d directory.
 Especially, don't forget to specify correct value for the MANAGER.
 
 You can also run an interactive configuration session by executing 
Index: files/delegated.sh
===================================================================
RCS file: /export/cvs/FreeBSD/ncvs/ports/net/delegate/files/delegated.sh,v
retrieving revision 1.3
diff -u -r1.3 delegated.sh
--- files/delegated.sh	29 Oct 2000 13:41:28 -0000	1.3
+++ files/delegated.sh	4 Sep 2004 12:27:23 -0000
@@ -1,13 +1,28 @@
 #!/bin/sh
 
-umask 027
-if [ -x /usr/local/sbin/delegated ]; then
-        echo -n ' delegated'
-	/usr/local/sbin/delegated -P8080 -Txt \
+# PROVIDE: delegate
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+delegate_enable=${delegate_enable-"NO"}
+delegate_pidfile=${delegate_pidfile-"/var/run/delegated.pid"}
+delegate_flags=${delegate_flags-"-P8080 -Txt PIDFILE=$delegate_pidfile \
 	ADMIN=delegate-master at your.host.domain \
-        CHARCODE=JIS \
-        CACHEDIR=/var/spool/delegate/cache \
-        EXPIRE=7d \
-        RELIABLE=hostname \
-        > /dev/null 2>&1
-fi
+	CHARCODE=JIS \
+	CACHEDIR=/var/spool/delegate/cache \
+	EXPIRE=7d \
+	RELIABLE=hostname >/dev/null 2>&1"}
+
+. %%RC_SUBR%%
+
+name="delegate"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/delegated"
+
+load_rc_config $name
+
+run_rc_command "$1"



More information about the freebsd-ports-bugs mailing list