diff options
author | grant <grant> | 2002-09-15 14:39:50 +0000 |
---|---|---|
committer | grant <grant> | 2002-09-15 14:39:50 +0000 |
commit | b47fa4c6932dc736395093b7803cd607d2e9fad0 (patch) | |
tree | 21ec07b110c2c46e30995baf90350425acaa60f7 /www | |
parent | 6526831d2c16583041120a058914385b560954fd (diff) | |
download | pkgsrc-b47fa4c6932dc736395093b7803cd607d2e9fad0.tar.gz |
* make use of PKG_SYSCONFDIR in rc script.
* use bsd.pkg.install.mk for rc script and config file installation.
Checked by Stoned Elipot <seb@netbsd.org>.
Diffstat (limited to 'www')
-rw-r--r-- | www/squid/INSTALL | 36 | ||||
-rw-r--r-- | www/squid/MESSAGE | 10 | ||||
-rw-r--r-- | www/squid/Makefile | 18 | ||||
-rw-r--r-- | www/squid/PLIST | 6 | ||||
-rw-r--r-- | www/squid/files/squid.sh | 10 |
5 files changed, 27 insertions, 53 deletions
diff --git a/www/squid/INSTALL b/www/squid/INSTALL deleted file mode 100644 index 51cb55be958..00000000000 --- a/www/squid/INSTALL +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $NetBSD: INSTALL,v 1.4 2002/03/22 14:59:01 tron Exp $ -# - -PKGNAME=$1 -EXCONFDIR=${PKG_PREFIX}/share/examples/squid/ -SYSCONFDIR=@SYSCONFDIR@/ -SQUIDCONF=squid.conf -MIMECONF=mime.conf - -case $2 in - PRE-INSTALL) - ;; - POST-INSTALL) - echo "" - echo " o You DO need running nameservice to start and run ${PKGNAME}". - echo "" - echo " o Use the ${PKGNAME} proxy and caching WWW Server by" - echo " configuring your WWW Navigator (Netscape, Mosaic,...)" - echo " to use it as a proxy server." - echo "" - echo " o Copy \"${EXCONFDIR}${SQUIDCONF}\" to" - echo " \"${SYSCONFDIR}${SQUIDCONF}\" and" - echo " \"${EXCONFDIR}${MIMECONF}\" to" - echo " \"${SYSCONFDIR}${MIMECONF}\"" - echo " and edit them as required. You should pay attention to the" - echo " ACTUAL locations of the cache \"spool\" logfiles and pidfile." - echo "" - ;; - *) - echo "Unexpected Argument ${2}." - exit 1 - ;; -esac -exit 0 diff --git a/www/squid/MESSAGE b/www/squid/MESSAGE new file mode 100644 index 00000000000..cc8c1863a22 --- /dev/null +++ b/www/squid/MESSAGE @@ -0,0 +1,10 @@ +============================================================================= +$NetBSD: MESSAGE,v 1.1 2002/09/15 14:39:50 grant Exp $ + +You DO need running nameservice to start and run ${PKGNAME}. + +Use the ${PKGNAME} proxy and caching WWW Server by +configuring your WWW Navigator (Netscape, Mosaic, ...) +to use it as a proxy server. + +============================================================================= diff --git a/www/squid/Makefile b/www/squid/Makefile index 98aaae102fb..2ff5ced077a 100644 --- a/www/squid/Makefile +++ b/www/squid/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.66 2002/08/26 06:42:12 grant Exp $ +# $NetBSD: Makefile,v 1.67 2002/09/15 14:39:51 grant Exp $ DISTNAME= squid-2.4.STABLE7-src PKGNAME= squid-2.4.7 @@ -27,9 +27,14 @@ CONFIGURE_ENV+= PERL=${PERL5} BUILD_DEFS+= SQUID_CONFIGURE_ARGS MAKEFILE= makefile MAKE_ENV+= INSTALL_SCRIPT="${INSTALL_SCRIPT}" PKG_PREFIX="${PREFIX}" -INSTALL_FILE= ${WRKDIR}/INSTALL PLIST_SRC= ${WRKDIR}/PLIST WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//} +RCD_SCRIPTS= squid + +CONF_FILES+= ${PREFIX}/share/examples/squid/mime.conf \ + ${PKG_SYSCONFDIR}/mime.conf +CONF_FILES+= ${PREFIX}/share/examples/squid/squid.conf \ + ${PKG_SYSCONFDIR}/squid.conf # Configuration options which can be overwritten by the user. SQUID_CONFIGURE_ARGS?= --disable-internal-dns \ @@ -44,12 +49,9 @@ SQUID_CONFIGURE_ARGS?= --disable-internal-dns \ OPTIONAL_FILES= libexec/diskd libexec/dnsserver libexec/pinger libexec/unlinkd post-build: - ${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/squid.sh >${WRKDIR}/squid.sh - ${SED} s#@SYSCONFDIR@#${PKG_SYSCONFDIR}#g <${PKGDIR}/INSTALL \ - >${WRKDIR}/INSTALL + @${SED} ${FILES_SUBST_SED} ${FILESDIR}/squid.sh > ${WRKDIR}/squid pre-install: - @${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR} @${INSTALL_DATA_DIR} ${PREFIX}/share/examples/squid @${INSTALL_DATA_DIR} ${PREFIX}/share/squid @${INSTALL_DATA_DIR} ${PREFIX}/share/squid/errors @@ -57,8 +59,7 @@ pre-install: post-install: cd ${WRKSRC}/src; ${TEST} ! -x pinger || ${MAKE} install-pinger - ${INSTALL_SCRIPT} ${WRKDIR}/squid.sh ${PREFIX}/etc/rc.d/squid - @${SETENV} ${MAKE_ENV} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL + ${INSTALL_SCRIPT} ${WRKDIR}/squid ${RCD_SCRIPTS_EXAMPLEDIR}/squid @${CP} ${PKGDIR}/PLIST ${PLIST_SRC} @( \ for FILE in ${OPTIONAL_FILES}; do \ @@ -74,4 +75,5 @@ post-install: ${ECHO} "@dirrm share/squid" \ ) >>${PLIST_SRC} +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/www/squid/PLIST b/www/squid/PLIST index 2251bf5e278..2cf36e3e673 100644 --- a/www/squid/PLIST +++ b/www/squid/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2002/06/26 10:30:08 seb Exp $ +@comment $NetBSD: PLIST,v 1.7 2002/09/15 14:39:51 grant Exp $ etc/rc.d/squid @unexec ${RMDIR} %D/etc/squid 2>/dev/null || ${TRUE} libexec/cachemgr.cgi @@ -9,5 +9,5 @@ sbin/RunCache sbin/client sbin/squid @dirrm share/examples/squid -@exec ${MKDIR} ${SQUID_SYSCONFDIR} -@unexec rmdir ${SQUID_SYSCONFDIR} 2>/dev/null || true +@exec ${MKDIR} ${PKG_SYSCONFDIR} +@unexec rmdir ${PKG_SYSCONFDIR} 2>/dev/null || true diff --git a/www/squid/files/squid.sh b/www/squid/files/squid.sh index c1a775f15bf..b54d9e98946 100644 --- a/www/squid/files/squid.sh +++ b/www/squid/files/squid.sh @@ -1,20 +1,18 @@ -#! /bin/sh +#!@SH@ # -# $NetBSD: squid.sh,v 1.13 2002/03/18 21:27:00 tron Exp $ +# $NetBSD: squid.sh,v 1.14 2002/09/15 14:39:51 grant Exp $ # # PROVIDE: squid # REQUIRE: DAEMON # KEYWORD: shutdown -SQUID_CONF_DIR="@PREFIX@/etc/squid" - -conf_file="${SQUID_CONF_DIR}/squid.conf" +conf_file="@PKG_SYSCONFDIR@/squid.conf" name="squid" command="@PREFIX@/sbin/${name}" pidfile="/var/run/${name}.pid" -required_files="${conf_file} ${SQUID_CONF_DIR}/mime.conf" +required_files="${conf_file} @PKG_SYSCONFDIR@/mime.conf" command_args="-Y -f $conf_file" start_cmd="${command} ${command_args}" |