pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/wwwoffle Use bsd.pkg.install.mk to handle generati...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/714b4f65c5a5
branches:  trunk
changeset: 460352:714b4f65c5a5
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Fri Aug 29 09:25:40 2003 +0000

description:
Use bsd.pkg.install.mk to handle generation and installation of the rc.d
script.  Bump PKGREVISION to 1.

diffstat:

 www/wwwoffle/Makefile           |  18 ++++++++----------
 www/wwwoffle/files/wwwoffled    |  36 ------------------------------------
 www/wwwoffle/files/wwwoffled.sh |  37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 46 deletions(-)

diffs (134 lines):

diff -r d206002d2b99 -r 714b4f65c5a5 www/wwwoffle/Makefile
--- a/www/wwwoffle/Makefile     Fri Aug 29 09:23:25 2003 +0000
+++ b/www/wwwoffle/Makefile     Fri Aug 29 09:25:40 2003 +0000
@@ -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
+PKGREVISION=   1
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_SUNSITE:=apps/www/servers/} \
                ftp://ftp.demon.co.uk/pub/unix/httpd/ \
@@ -12,14 +13,17 @@
 COMMENT=       WWW proxy with support for offline browsing
 
 USE_GMAKE=     yes
+USE_PKGINSTALL=        yes
 GNU_CONFIGURE= yes
 
 CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+= --with-spooldir=/var/wwwoffle
 
-PKG_SYSCONFSUBDIR= wwwoffle
-PLIST_SUBST+=  GTAR="${GTAR}" PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"
-INSTALL_FILE=  ${WRKDIR}/INSTALL
+PKG_SYSCONFSUBDIR=     wwwoffle
+PLIST_SUBST+=          GTAR="${GTAR}"
+INSTALL_EXTRA_TMPL=    ${PKGDIR}/INSTALL
+
+RCD_SCRIPTS=           wwwoffled
 
 post-build:
        cd ${WRKSRC}/cache/search/htdig/scripts; \
@@ -29,11 +33,6 @@
                  -e 's#/usr/local#${PREFIX}#' $$f.old > $$f; \
                ${RM} $$f.old; \
        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
 # is never run, leaves an incomplete cache directory, which the install
@@ -58,7 +57,6 @@
          ${PREFIX}/sbin/wwwoffle-upgrade-config.pl
        ${INSTALL_SCRIPT} ${WRKSRC}/conf/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
        ${GTAR} czCf / ${PREFIX}/libdata/wwwoffle-spool.tar.gz \
                var/wwwoffle/html var/wwwoffle/search
diff -r d206002d2b99 -r 714b4f65c5a5 www/wwwoffle/files/wwwoffled
--- a/www/wwwoffle/files/wwwoffled      Fri Aug 29 09:23:25 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: wwwoffled,v 1.4 2002/08/10 17:03:27 fredb Exp $
-#
-# PROVIDE: wwwoffled
-# REQUIRE: DAEMON network
-
-if [ -f /etc/rc.subr ]; then
-       . /etc/rc.subr
-fi
-
-name="wwwoffled"
-command="@PREFIX@/sbin/${name}"
-control_prog="@PREFIX@/bin/wwwoffle"
-command_args="-c @PKG_SYSCONFDIR@/wwwoffle.conf"
-required_files="@PKG_SYSCONFDIR@/wwwoffle.conf"
-start_cmd=wwwoffled_start
-stop_cmd="${control_prog} ${command_args} -kill"
-autodial_cmd="${control_prog} -autodial ${command_args}"
-offline_cmd="${control_prog} -offline ${command_args}"
-online_cmd="${control_prog} -online ${command_args}"
-extra_commands="autodial offline online"
-
-wwwoffled_start() {
-       eval "${command} ${command_args}"
-       eval "${control_prog} -online ${command_args}"
-       eval "${control_prog} -fetch ${command_args}"
-}
-
-if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
-       load_rc_config $name
-       run_rc_command "$1"
-else
-       echo -n ' ${name}'
-       ${start_cmd}
-fi
diff -r d206002d2b99 -r 714b4f65c5a5 www/wwwoffle/files/wwwoffled.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/wwwoffle/files/wwwoffled.sh   Fri Aug 29 09:25:40 2003 +0000
@@ -0,0 +1,37 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: wwwoffled.sh,v 1.1 2003/08/29 09:25:41 jmmv Exp $
+#
+# PROVIDE: wwwoffled
+# REQUIRE: DAEMON network
+#
+
+if [ -f /etc/rc.subr ]; then
+       . /etc/rc.subr
+fi
+
+name="wwwoffled"
+command="@PREFIX@/sbin/${name}"
+control_prog="@PREFIX@/bin/wwwoffle"
+command_args="-c @PKG_SYSCONFDIR@/wwwoffle.conf"
+required_files="@PKG_SYSCONFDIR@/wwwoffle.conf"
+start_cmd=wwwoffled_start
+stop_cmd="${control_prog} ${command_args} -kill"
+autodial_cmd="${control_prog} -autodial ${command_args}"
+offline_cmd="${control_prog} -offline ${command_args}"
+online_cmd="${control_prog} -online ${command_args}"
+extra_commands="autodial offline online"
+
+wwwoffled_start() {
+       eval "${command} ${command_args}"
+       eval "${control_prog} -online ${command_args}"
+       eval "${control_prog} -fetch ${command_args}"
+}
+
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+       load_rc_config $name
+       run_rc_command "$1"
+else
+       printf " ${name}"
+       ${start_cmd}
+fi



Home | Main Index | Thread Index | Old Index