Use bsd.pkg.install.mk to handle generation and installation of the rc.d

script.  Bump PKGREVISION to 1.
This commit is contained in:
jmmv 2003-08-29 09:25:40 +00:00
parent bfe5412698
commit 22a7d6e637
2 changed files with 12 additions and 13 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.46 2003/07/17 22:56:08 grant Exp $ # $NetBSD: Makefile,v 1.47 2003/08/29 09:25:40 jmmv Exp $
DISTNAME= wwwoffle-2.7f DISTNAME= wwwoffle-2.7f
PKGREVISION= 1
CATEGORIES= www CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/www/servers/} \ MASTER_SITES= ${MASTER_SITE_SUNSITE:=apps/www/servers/} \
ftp://ftp.demon.co.uk/pub/unix/httpd/ \ ftp://ftp.demon.co.uk/pub/unix/httpd/ \
@ -12,14 +13,17 @@ HOMEPAGE= http://www.gedanken.demon.co.uk/wwwoffle/
COMMENT= WWW proxy with support for offline browsing COMMENT= WWW proxy with support for offline browsing
USE_GMAKE= yes USE_GMAKE= yes
USE_PKGINSTALL= yes
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR} CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-spooldir=/var/wwwoffle CONFIGURE_ARGS+= --with-spooldir=/var/wwwoffle
PKG_SYSCONFSUBDIR= wwwoffle PKG_SYSCONFSUBDIR= wwwoffle
PLIST_SUBST+= GTAR="${GTAR}" PKG_SYSCONFDIR="${PKG_SYSCONFDIR}" PLIST_SUBST+= GTAR="${GTAR}"
INSTALL_FILE= ${WRKDIR}/INSTALL INSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL
RCD_SCRIPTS= wwwoffled
post-build: post-build:
cd ${WRKSRC}/cache/search/htdig/scripts; \ cd ${WRKSRC}/cache/search/htdig/scripts; \
@ -29,11 +33,6 @@ post-build:
-e 's#/usr/local#${PREFIX}#' $$f.old > $$f; \ -e 's#/usr/local#${PREFIX}#' $$f.old > $$f; \
${RM} $$f.old; \ ${RM} $$f.old; \
done done
${SED} -e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
-e 's#@PREFIX@#${PREFIX}#g' \
${FILESDIR}/wwwoffled > ${WRKDIR}/wwwoffled
${SED} -e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
INSTALL > ${WRKDIR}/INSTALL
# For bulk-build machines: a one-time install/deinstall, if wwwoffle # For bulk-build machines: a one-time install/deinstall, if wwwoffle
# is never run, leaves an incomplete cache directory, which the install # is never run, leaves an incomplete cache directory, which the install
@ -58,7 +57,6 @@ post-install:
${PREFIX}/sbin/wwwoffle-upgrade-config.pl ${PREFIX}/sbin/wwwoffle-upgrade-config.pl
${INSTALL_SCRIPT} ${WRKSRC}/conf/upgrade-config-2.x-2.5.pl \ ${INSTALL_SCRIPT} ${WRKSRC}/conf/upgrade-config-2.x-2.5.pl \
${PREFIX}/sbin/wwwoffle-upgrade-config-2.x-2.5.pl ${PREFIX}/sbin/wwwoffle-upgrade-config-2.x-2.5.pl
${INSTALL_SCRIPT} ${WRKDIR}/wwwoffled ${PREFIX}/etc/rc.d
# Directories other than html and search are automatically created at run time # Directories other than html and search are automatically created at run time
${GTAR} czCf / ${PREFIX}/libdata/wwwoffle-spool.tar.gz \ ${GTAR} czCf / ${PREFIX}/libdata/wwwoffle-spool.tar.gz \
var/wwwoffle/html var/wwwoffle/search var/wwwoffle/html var/wwwoffle/search

View file

@ -1,9 +1,10 @@
#!/bin/sh #!@RCD_SCRIPTS_SHELL@
# #
# $NetBSD: wwwoffled,v 1.4 2002/08/10 17:03:27 fredb Exp $ # $NetBSD: wwwoffled.sh,v 1.1 2003/08/29 09:25:41 jmmv Exp $
# #
# PROVIDE: wwwoffled # PROVIDE: wwwoffled
# REQUIRE: DAEMON network # REQUIRE: DAEMON network
#
if [ -f /etc/rc.subr ]; then if [ -f /etc/rc.subr ]; then
. /etc/rc.subr . /etc/rc.subr
@ -31,6 +32,6 @@ if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config $name load_rc_config $name
run_rc_command "$1" run_rc_command "$1"
else else
echo -n ' ${name}' printf " ${name}"
${start_cmd} ${start_cmd}
fi fi