diff options
author | tron <tron@pkgsrc.org> | 2001-09-18 16:24:57 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2001-09-18 16:24:57 +0000 |
commit | f38aa4ec860c2503d7abe9c6d6f468624027a5e6 (patch) | |
tree | 40ab647333efc036f5c2b769aab4cca9a233bbfe /www | |
parent | accb7c4f492dce728de31c9d32878c5b8b9be296 (diff) | |
download | pkgsrc-f38aa4ec860c2503d7abe9c6d6f468624027a5e6.tar.gz |
Adapt package list to configuration options dynamically. This fixes
PR pkg/13971 by David Sainty.
Diffstat (limited to 'www')
-rw-r--r-- | www/squid/Makefile | 23 | ||||
-rw-r--r-- | www/squid/pkg/PLIST | 4 |
2 files changed, 15 insertions, 12 deletions
diff --git a/www/squid/Makefile b/www/squid/Makefile index be30910e72a..ab570ae11d4 100644 --- a/www/squid/Makefile +++ b/www/squid/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.50 2001/07/30 07:32:13 tron Exp $ +# $NetBSD: Makefile,v 1.51 2001/09/18 16:24:57 tron Exp $ DISTNAME= squid-2.4.STABLE1-src PKGNAME= squid-2.4.1nb2 @@ -42,6 +42,8 @@ SQUID_CONFIGURE_ARGS?= --enable-cachemgr-hostname=localhost \ --enable-snmp \ --enable-underscores +OPTIONAL_FILES= libexec/pinger libexec/unlinkd + post-configure: @cd ${WRKSRC}/include && \ ${MV} autoconf.h autoconf.h.prepatch && \ @@ -52,24 +54,27 @@ post-build: ${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/squid.sh >${WRKDIR}/squid.sh pre-install: - @${CP} ${PKGDIR}/PLIST ${PLIST_SRC} @${INSTALL_DATA_DIR} ${PREFIX}/share/squid @${INSTALL_DATA_DIR} ${PREFIX}/share/squid/errors @${INSTALL_DATA_DIR} ${PREFIX}/share/squid/icons + +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 + @${CP} ${PKGDIR}/PLIST ${PLIST_SRC} @( \ + for FILE in ${OPTIONAL_FILES}; do \ + ${TEST} ! -e ${PREFIX}/$$FILE || ${ECHO} $$FILE; \ + done; \ cd ${WRKSRC}/errors/English; \ - ls ERR_* | ${SED} -e 's@^@share/squid/errors/@'; \ + ls ERR_* | ${SED} -e 's@^@share/squid/errors/@'; \ ${ECHO} "@dirrm share/squid/errors"; \ cd ${WRKSRC}/icons; \ ls anthony-*.gif | ${SED} -e 's@^@share/squid/icons/@'; \ ${ECHO} "@dirrm share/squid/icons"; \ ${ECHO} "share/squid/mib.txt"; \ - ${ECHO} "@dirrm share/squid"; \ + ${ECHO} "@dirrm share/squid" \ ) >>${PLIST_SRC} -post-install: - cd ${WRKSRC}/src; ${MAKE} install-pinger - ${INSTALL_SCRIPT} ${WRKDIR}/squid.sh ${PREFIX}/etc/rc.d/squid - @${SETENV} ${MAKE_ENV} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL - .include "../../mk/bsd.pkg.mk" diff --git a/www/squid/pkg/PLIST b/www/squid/pkg/PLIST index e773c0b0ded..ed74df0061a 100644 --- a/www/squid/pkg/PLIST +++ b/www/squid/pkg/PLIST @@ -1,11 +1,9 @@ -@comment $NetBSD: PLIST,v 1.6 2001/07/29 16:41:19 tron Exp $ +@comment $NetBSD: PLIST,v 1.7 2001/09/18 16:24:58 tron Exp $ etc/rc.d/squid etc/squid/mime.conf.default etc/squid/squid.conf.default @unexec rmdir %D/etc/squid 2>/dev/null || true libexec/cachemgr.cgi -libexec/pinger -libexec/unlinkd sbin/RunAccel sbin/RunCache sbin/client |