diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/ap-ssl/Makefile | 3 | ||||
-rw-r--r-- | www/ap-ssl/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | www/apache/Makefile | 3 | ||||
-rw-r--r-- | www/apache/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | www/apache6/Makefile | 49 | ||||
-rw-r--r-- | www/apache6/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | www/cvsweb/Makefile | 26 | ||||
-rw-r--r-- | www/cvsweb/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | www/horde/Makefile | 31 | ||||
-rw-r--r-- | www/horde/pkg/DEINSTALL | 7 | ||||
-rw-r--r-- | www/php4/Makefile | 22 | ||||
-rw-r--r-- | www/php4/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | www/surfraw/Makefile | 18 | ||||
-rw-r--r-- | www/surfraw/pkg/DEINSTALL | 5 | ||||
-rw-r--r-- | www/thttpd/Makefile | 18 | ||||
-rw-r--r-- | www/thttpd/pkg/DEINSTALL | 5 |
16 files changed, 113 insertions, 99 deletions
diff --git a/www/ap-ssl/Makefile b/www/ap-ssl/Makefile index e50dfcad4db..14534607681 100644 --- a/www/ap-ssl/Makefile +++ b/www/ap-ssl/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2001/06/09 06:50:24 jlam Exp $ +# $NetBSD: Makefile,v 1.38 2001/07/13 07:09:24 jlam Exp $ DISTNAME= mod_ssl-2.8.4-1.3.20 PKGNAME= ap-ssl-2.8.4 @@ -36,6 +36,7 @@ INSTALL_FILE= ${WRKDIR}/INSTALL FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} FILES_SUBST+= CAT=${CAT:Q} FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} FILES_SUBST+= MKDIR=${MKDIR:Q} FILES_SUBST+= PREFIX=${PREFIX} diff --git a/www/ap-ssl/pkg/DEINSTALL b/www/ap-ssl/pkg/DEINSTALL index dd98806fed8..c75f7cd978d 100644 --- a/www/ap-ssl/pkg/DEINSTALL +++ b/www/ap-ssl/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/04/29 20:36:48 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:24 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SERVERROOT="@APACHE_SYSCONFDIR@" @@ -30,7 +31,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/apache/Makefile b/www/apache/Makefile index 1671be451fc..8c6a1f5cd8a 100644 --- a/www/apache/Makefile +++ b/www/apache/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.74 2001/07/09 02:45:09 hubertf Exp $ +# $NetBSD: Makefile,v 1.75 2001/07/13 07:09:24 jlam Exp $ # # This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of # code hooks that allow mod_ssl to be compiled separately later, if desired). @@ -97,6 +97,7 @@ FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} FILES_SUBST+= CAT=${CAT:Q} FILES_SUBST+= CHMOD=${CHMOD:Q} FILES_SUBST+= CHOWN=${CHOWN:Q} +FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} FILES_SUBST+= MKDIR=${MKDIR:Q} FILES_SUBST+= PREFIX=${PREFIX} diff --git a/www/apache/pkg/DEINSTALL b/www/apache/pkg/DEINSTALL index 13fc444fab7..029f5f0f568 100644 --- a/www/apache/pkg/DEINSTALL +++ b/www/apache/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.8 2001/05/02 22:22:43 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.9 2001/07/13 07:09:25 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -28,7 +29,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.default - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/apache6/Makefile b/www/apache6/Makefile index 323b40cae3a..2bc446ff339 100644 --- a/www/apache6/Makefile +++ b/www/apache6/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2001/05/18 06:01:36 jlam Exp $ +# $NetBSD: Makefile,v 1.32 2001/07/13 07:09:25 jlam Exp $ # # This package does not compile in mod_ssl support hooks, as it conflicts # with IPv6-enable patch. @@ -93,12 +93,27 @@ BUILD_DEFS+= APACHE_SUEXEC DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +# Given foo=${bar}, replace @foo@ with ${bar}. +# +FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CHOWN=${CHOWN:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= MKDIR=${MKDIR:Q} +FILES_SUBST+= PREFIX=${PREFIX} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST+= RMDIR=${RMDIR:Q} +FILES_SUBST+= TRUE=${TRUE:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/-e s!@/} + # Note that there is NO static compile module hook here. This is intentional. # Under Apache 1.3, modules can be compiled to link dynamically to the server # using the "apxs" program. See apxs(8). pre-patch: - ${FIND} ${WRKSRC} -name '*.orig' -exec ${RM} -f {} \; + ${FIND} ${WRKSRC} -name '*.orig' -print | ${XARGS} ${RM} -f post-patch: for file in ${IPV6_PATCH}; do \ @@ -109,38 +124,24 @@ post-patch: ${CHMOD} +x ${CONFIGURE_SCRIPT} pre-configure: - ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ + ${SED} ${FILES_SUBST_SED} \ ${FILESDIR}/config.layout > ${WRKDIR}/config.layout pre-install: - ${FIND} ${WRKSRC}/htdocs -name '*.orig' -exec ${RM} -f {} \; - ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - ${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh - ${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - -e "s|@RMDIR@|${RMDIR}|g" \ - -e "s|@TRUE@|${TRUE}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CHOWN@|${CHOWN}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@MKDIR@|${MKDIR}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${FIND} ${WRKSRC}/htdocs -name '*.orig' -print | ${XARGS} ${RM} -f + ${SED} ${FILES_SUBST_SED} ${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} post-install: .if !defined(NOPIC) cd ${PREFIX}/lib/httpd; ${MV} libproxy.so mod_proxy.so .endif ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/httpd - for i in httpd.conf magic mime.types; do \ - ${INSTALL_DATA} ${APACHE_SYSCONFDIR}/$$i.default \ + for file in httpd.conf magic mime.types; do \ + ${INSTALL_DATA} ${APACHE_SYSCONFDIR}/$${file}.default \ ${PREFIX}/share/examples/httpd; \ - ${RM} -f ${APACHE_SYSCONFDIR}/$$i.default; \ + ${RM} -f ${APACHE_SYSCONFDIR}/$${file}.default; \ done ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs ${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache diff --git a/www/apache6/pkg/DEINSTALL b/www/apache6/pkg/DEINSTALL index 1ef08a3f7e5..25b8f78bbe3 100644 --- a/www/apache6/pkg/DEINSTALL +++ b/www/apache6/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.4 2001/05/02 22:22:43 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.5 2001/07/13 07:09:25 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -28,7 +29,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.default - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/cvsweb/Makefile b/www/cvsweb/Makefile index af3e190a255..ed4a1f1cf40 100644 --- a/www/cvsweb/Makefile +++ b/www/cvsweb/Makefile @@ -1,5 +1,5 @@ # -# $NetBSD: Makefile,v 1.2 2001/04/23 20:12:24 kim Exp $ +# $NetBSD: Makefile,v 1.3 2001/07/13 07:09:25 jlam Exp $ # DISTNAME= cvsweb-1.93 @@ -24,23 +24,23 @@ INSTALL_FILE= ${WRKDIR}/INSTALL APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd +FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + do-build: ${MV} ${WRKSRC}/cvsweb.cgi ${WRKSRC}/cvsweb.cgi.bak - ${SED} -e 's,/usr/bin/perl,${PERL5},' \ - -e 's,/usr/local/web/apache/conf/,${APACHE_SYSCONFDIR}/,' \ + ${SED} -e 's,/usr/bin/perl,${PERL5},' \ + -e 's,/usr/local/web/apache/conf/,${APACHE_SYSCONFDIR}/,' \ ${WRKSRC}/cvsweb.cgi.bak > ${WRKSRC}/cvsweb.cgi pre-install: - ${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@RM@|${RM}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} do-install: ${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/cgi-bin diff --git a/www/cvsweb/pkg/DEINSTALL b/www/cvsweb/pkg/DEINSTALL index 0b57cf215c8..556aff6e547 100644 --- a/www/cvsweb/pkg/DEINSTALL +++ b/www/cvsweb/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1.1.1 2001/04/23 20:05:44 kim Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:26 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" CP="@CP@" RM="@RM@" @@ -23,7 +24,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.default - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/horde/Makefile b/www/horde/Makefile index 0bc889d13d0..c2970aa3726 100644 --- a/www/horde/Makefile +++ b/www/horde/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/06/07 16:30:49 jlam Exp $ +# $NetBSD: Makefile,v 1.8 2001/07/13 07:09:26 jlam Exp $ DISTNAME= horde-1.2.5 CATEGORIES= www @@ -30,6 +30,18 @@ APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd BUILD_DEFS+= APACHE_SYSCONFDIR MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST= HORDEDIR=${HORDEDIR:S/^${PREFIX}\///} +FILES_SUBST= PHPLIBDIR=${PHPLIBDIR:S/^${PREFIX}\///} +FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST+= RMDIR=${RMDIR:Q} +FILES_SUBST+= TRUE=${TRUE:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + post-extract: cd ${WRKSRC}/phplib; \ for file in local.inc prepend.php3; do \ @@ -70,21 +82,8 @@ pre-install: ${FILESDIR}/horde_setup.sh > ${WRKDIR}/horde_setup.sh ${SED} -e "s|@HORDEDIR@|${HORDEDIR}|g" \ ${FILESDIR}/horde_secure.sh > ${WRKDIR}/horde_secure.sh - ${SED} -e "s|@HORDEDIR@|${HORDEDIR:S/^${PREFIX}\///}|g" \ - -e "s|@PHPLIBDIR@|${PHPLIBDIR:S/^${PREFIX}\///}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - -e "s|@RMDIR@|${RMDIR}|g" \ - -e "s|@TRUE@|${TRUE}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@HORDEDIR@|${HORDEDIR:S/^${PREFIX}\///}|g" \ - -e "s|@PHPLIBDIR@|${PHPLIBDIR:S/^${PREFIX}\///}|g" \ - -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CP@|${CP}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL do-install: diff --git a/www/horde/pkg/DEINSTALL b/www/horde/pkg/DEINSTALL index 298f4bb423f..d010e188aea 100644 --- a/www/horde/pkg/DEINSTALL +++ b/www/horde/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/04/30 05:53:29 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:26 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -33,14 +34,14 @@ DEINSTALL) # FILE=${CONFDIR}/horde.conf SAMPLEFILE=${SAMPLECONFDIR}/horde.conf - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi for FILE in ${CONFFILES} ${NONCONFFILES} do SAMPLEFILE=${FILE}.dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/php4/Makefile b/www/php4/Makefile index b3ecc9ddc00..e2355871afd 100644 --- a/www/php4/Makefile +++ b/www/php4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2001/05/14 14:12:28 jlam Exp $ +# $NetBSD: Makefile,v 1.13 2001/07/13 07:09:26 jlam Exp $ .include "../../www/php4/Makefile.common" @@ -15,17 +15,17 @@ EGDIR= ${PREFIX}/share/examples/php DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= PHP_CONFDIR=${PHP_CONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + pre-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/thttpd - ${SED} -e "s|@PHP_CONFDIR@|${PHP_CONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@PHP_CONFDIR@|${PHP_CONFDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CP@|${CP}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL post-install: diff --git a/www/php4/pkg/DEINSTALL b/www/php4/pkg/DEINSTALL index 3b5eca1f08c..01d739fa8a2 100644 --- a/www/php4/pkg/DEINSTALL +++ b/www/php4/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/05/14 14:12:30 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:27 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples/php @@ -21,7 +22,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}-dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/surfraw/Makefile b/www/surfraw/Makefile index ad11c12f8f0..a1abcd4c5f5 100644 --- a/www/surfraw/Makefile +++ b/www/surfraw/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2001/04/11 11:17:54 jlam Exp $ +# $NetBSD: Makefile,v 1.11 2001/07/13 07:09:27 jlam Exp $ # DISTNAME= surfraw-1.0.3 @@ -18,14 +18,16 @@ INSTALL_FILE= ${WRKDIR}/INSTALL DOCDIR= ${PREFIX}/share/doc/surfraw +FILES_SUBST= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + pre-install: - ${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CP@|${CP}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} post-install: ${INSTALL_DATA_DIR} ${DOCDIR} diff --git a/www/surfraw/pkg/DEINSTALL b/www/surfraw/pkg/DEINSTALL index 8895ee15a66..a7d9ed926d3 100644 --- a/www/surfraw/pkg/DEINSTALL +++ b/www/surfraw/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.3 2001/04/11 11:17:55 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.4 2001/07/13 07:09:27 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/etc @@ -21,7 +22,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile index 7191e185c27..0a13b4759ca 100644 --- a/www/thttpd/Makefile +++ b/www/thttpd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2001/06/09 11:26:33 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2001/07/13 07:09:27 jlam Exp $ DISTNAME= thttpd-2.21b CATEGORIES= www @@ -19,6 +19,13 @@ BUILD_DEFS+= USE_INET6 DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + pre-configure: ${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thtpasswd.1 ${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thtpasswd.c @@ -36,13 +43,8 @@ post-build: pre-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/thttpd - ${SED} -e "s,@CAT@,${CAT},g" \ - -e "s,@RM@,${RM},g" \ - < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} -e "s,@CAT@,${CAT},g" \ - -e "s,@CHMOD@,${CHMOD},g" \ - -e "s,@CP@,${CP},g" \ - < ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL post-install: diff --git a/www/thttpd/pkg/DEINSTALL b/www/thttpd/pkg/DEINSTALL index 739c15f6dce..72577246275 100644 --- a/www/thttpd/pkg/DEINSTALL +++ b/www/thttpd/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2000/12/17 22:21:45 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:27 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples @@ -21,7 +22,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi |