Convert the rc.d script to the standard rc.subr format (if available) and

use the bsd.pkg.install.mk framework to handle it.  Bump PKGREVISION to 1.
This commit is contained in:
jmmv 2003-07-30 11:37:01 +00:00
parent 76b80a731a
commit c05611092f
5 changed files with 49 additions and 30 deletions

View file

@ -1,9 +1,8 @@
===========================================================================
$NetBSD: MESSAGE,v 1.3 2003/05/06 17:42:08 jmmv Exp $
$NetBSD: MESSAGE,v 1.4 2003/07/30 11:37:01 jmmv Exp $
Now copy the sample script in ${PREFIX}/etc/rc.d/delegated.sh.sample
to ${PREFIX}/etc/rc.d/delegated.sh and edit it according to your
needs.
Now copy the sample script in ${PREFIX}/etc/rc.d/delegated to
/etc/rc.d/delegated and edit it according to your needs.
Don't forget to specify a correct e-mail address for ADMIN.

View file

@ -1,9 +1,10 @@
# $NetBSD: Makefile,v 1.25 2003/03/28 09:42:28 wiz Exp $
# $NetBSD: Makefile,v 1.26 2003/07/30 11:37:02 jmmv Exp $
# FreeBSD Id: Makefile,v 1.14 1998/11/09 09:24:20 max Exp
#
DISTNAME= ${PKGNAME:S/-//}
DISTNAME= ${PKGNAME_NOREV:S/-//}
PKGNAME= delegate-8.5.2
PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.delegate.org/pub/DeleGate/ \
ftp://etlport.etl.go.jp/pub/DeleGate/ \
@ -21,19 +22,26 @@ MAINTAINER= rh@NetBSD.ORG
HOMEPAGE= http://www.delegate.org/
COMMENT= General purpose TCP/IP proxy system
USE_PKGINSTALL= yes
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= DELEGATE_MANAGER
DELEGATE_MANAGER?= root@localhost
RCD_SCRIPTS= delegated
FILES_SUBST+= ADMIN="${DELEGATE_MANAGER}"
OWN_DIRS_PERMS+= /var/spool/delegate/cache \
${ROOT_USER} ${ROOT_GROUP} 1777
OWN_DIRS_PERMS+= /var/spool/delegate-nobody nobody nobody 755
pre-build:
@${ECHO} "ADMIN=${DELEGATE_MANAGER}" >> ${WRKSRC}/DELEGATE_CONF
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/delegated ${PREFIX}/sbin
${SED} -e 's:__PREFIX__:${PREFIX}:g' \
-e 's:__ADMIN__:${DELEGATE_MANAGER}:g' \
${WRKSRC}/delegated.sh.template \
> ${WRKSRC}/delegated.sh.sample
${INSTALL_SCRIPT} ${WRKSRC}/delegated.sh.sample \
${PREFIX}/etc/rc.d
${INSTALL_SCRIPT} ${WRKDIR}/delegated ${PREFIX}/etc/rc.d
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/delegate
${INSTALL_DATA} ${WRKSRC}/doc/Manual.htm \
${PREFIX}/share/doc/delegate/manual.html

View file

@ -1,6 +1,6 @@
@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:55:11 zuntum Exp $
@comment $NetBSD: PLIST,v 1.2 2003/07/30 11:37:02 jmmv Exp $
sbin/delegated
etc/rc.d/delegated.sh.sample
etc/rc.d/delegated
share/doc/delegate/manual.html
share/doc/delegate/tutorial-en.html
share/doc/delegate/tutorial-jp.html

View file

@ -0,0 +1,28 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: delegated.sh,v 1.3 2003/07/30 11:37:03 jmmv Exp $
#
# PROVIDE: delegated
# REQUIRE: DAEMON
#
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="delegated"
rcvar=${name}
command="@PREFIX@/sbin/${name}"
command_args="-P8080 ADMIN=@ADMIN@ CHARCODE=JIS \
CACHEDIR=/var/spool/delegate/cache \
EXPIRE=7d RELIABLE=hostname >/dev/null 2>&1"
if [ -f /etc/rc.subr ]
then
load_rc_config $name
run_rc_command "$1"
else
@ECHO@ -n " ${name}"
${command} ${delegated_flags} ${command_args} >/dev/null 2>&1
fi

View file

@ -1,16 +0,0 @@
$NetBSD: patch-ab,v 1.2 2000/04/16 15:19:15 rh Exp $
--- /dev/null Sun Apr 16 13:06:24 2000
+++ delegated.sh.template Sun Apr 16 13:08:29 2000
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ -x __PREFIX__/sbin/delegated ]; then
+ __PREFIX__/sbin/delegated -P8080 \
+ ADMIN=__ADMIN__ \
+ CHARCODE=JIS \
+ CACHEDIR=/var/spool/delegate/cache \
+ EXPIRE=7d \
+ RELIABLE=hostname \
+ > /dev/null 2>&1 && echo -n ' delegated'
+fi