diff options
43 files changed, 277 insertions, 235 deletions
diff --git a/mail/imp/Makefile b/mail/imp/Makefile index f8247d6bf09..d12fc021661 100644 --- a/mail/imp/Makefile +++ b/mail/imp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/05/22 21:12:20 jlam Exp $ +# $NetBSD: Makefile,v 1.8 2001/07/13 07:09:17 jlam Exp $ DISTNAME= imp-2.2.5 CATEGORIES= mail www @@ -29,6 +29,17 @@ APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd BUILD_DEFS+= APACHE_SYSCONFDIR MESSAGE_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST= IMPDIR=${IMPDIR: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}/config; \ for file in \ @@ -58,26 +69,15 @@ post-patch: done do-build: - ${FIND} ${WRKSRC} -name "*.orig" -exec ${RM} -f {} \; - ${FIND} ${WRKSRC} -name "*.pl" -exec ${CHMOD} +x {} \; - ${FIND} ${WRKSRC} -name "*.sh" -exec ${CHMOD} +x {} \; + ${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f + ${FIND} ${WRKSRC} -name "*.pl" -print | ${XARGS} ${CHMOD} +x + ${FIND} ${WRKSRC} -name "*.sh" -print | ${XARGS} ${CHMOD} +x pre-install: ${SED} -e "s|@IMPDIR@|${IMPDIR}|g" \ ${FILESDIR}/imp.conf.dist > ${WRKDIR}/imp.conf.dist - ${SED} -e "s|@IMPDIR@|${IMPDIR: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|@IMPDIR@|${IMPDIR: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/mail/imp/pkg/DEINSTALL b/mail/imp/pkg/DEINSTALL index b885189ef4a..6c0f23c4357 100644 --- a/mail/imp/pkg/DEINSTALL +++ b/mail/imp/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/04/30 06:11:09 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:18 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -36,14 +37,14 @@ DEINSTALL) # FILE=${CONFDIR}/imp.conf SAMPLEFILE=${SAMPLECONFDIR}/imp.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/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile index 1c1ed15048d..7404836d9fc 100644 --- a/mail/mutt-devel/Makefile +++ b/mail/mutt-devel/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2001/06/30 14:49:57 jlam Exp $ +# $NetBSD: Makefile,v 1.7 2001/07/13 07:09:18 jlam Exp $ DISTNAME= mutt-1.3.18i CATEGORIES= mail @@ -50,6 +50,7 @@ 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!@/} diff --git a/mail/mutt-devel/pkg/DEINSTALL b/mail/mutt-devel/pkg/DEINSTALL index e9c0723d52f..4d9006a73b1 100644 --- a/mail/mutt-devel/pkg/DEINSTALL +++ b/mail/mutt-devel/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/07/12 06:05:29 tron Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:18 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/doc/mutt/samples @@ -22,7 +23,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if cmp -s ${FILE} ${SAMPLEFILE} + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile index becd21154f4..90895ed137d 100644 --- a/mail/mutt/Makefile +++ b/mail/mutt/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.73 2001/06/20 07:31:58 jlam Exp $ +# $NetBSD: Makefile,v 1.74 2001/07/13 07:09:18 jlam Exp $ DISTNAME= mutt-1.2.5i CATEGORIES= mail @@ -50,6 +50,7 @@ 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!@/} diff --git a/mail/mutt/pkg/DEINSTALL b/mail/mutt/pkg/DEINSTALL index 357c47e1754..1a58deb6a5f 100644 --- a/mail/mutt/pkg/DEINSTALL +++ b/mail/mutt/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.2 2001/07/12 06:05:28 tron Exp $ +# $NetBSD: DEINSTALL,v 1.3 2001/07/13 07:09:19 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/doc/mutt/samples @@ -22,7 +23,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if cmp -s ${FILE} ${SAMPLEFILE} + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/mail/sq-squirrelspell/Makefile b/mail/sq-squirrelspell/Makefile index 75b1799d09a..2b42c02c68f 100644 --- a/mail/sq-squirrelspell/Makefile +++ b/mail/sq-squirrelspell/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2001/05/16 08:08:41 jlam Exp $ +# $NetBSD: Makefile,v 1.3 2001/07/13 07:09:19 jlam Exp $ DISTNAME= squirrelspell.0.3.5-1.0.6 PKGNAME= sq-squirrelspell-0.3.5 @@ -23,18 +23,19 @@ NO_BUILD= # defined DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= SMDIR=${SMDIR:S/^${PREFIX}\///} +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!@/} + pre-install: - ${SED} -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|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|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|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/mail/sq-squirrelspell/pkg/DEINSTALL b/mail/sq-squirrelspell/pkg/DEINSTALL index 69ea198f63e..f030fa455d4 100644 --- a/mail/sq-squirrelspell/pkg/DEINSTALL +++ b/mail/sq-squirrelspell/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1.1.1 2001/05/16 07:57:24 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:19 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -21,7 +22,7 @@ DEINSTALL) # FILE=${CONFDIR}/sqspell_config.php SAMPLEFILE=${CONFDIR}/sqspell_config.dist - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index c8fe06ae65b..1beed6d82fd 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2001/04/30 05:35:45 jlam Exp $ +# $NetBSD: Makefile,v 1.11 2001/07/13 07:09:19 jlam Exp $ DISTNAME= squirrelmail-1.0.6 CATEGORIES= mail www @@ -30,6 +30,20 @@ MESSAGE_SUBST+= SMDIR=${SMDIR} DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL +FILES_SUBST= SMDIR=${SMDIR:S/^${PREFIX}\///} +FILES_SUBST+= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHGRP=${CHGRP: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+= 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}; \ ${MV} config/conf.pl config/conf.pl.orig; \ @@ -45,22 +59,8 @@ pre-install: ${SED} -e "s|@SMDIR@|${SMDIR}|g" \ ${FILESDIR}/squirrelmail.conf.dist \ > ${WRKDIR}/squirrelmail.conf.dist - ${SED} -e "s|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|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|@APACHE_SYSCONFDIR@|${APACHE_SYSCONFDIR}|g" \ - -e "s|@SMDIR@|${SMDIR:S/^${PREFIX}\///}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHGRP@|${CHGRP}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CHOWN@|${CHOWN}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@MKDIR@|${MKDIR}|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/mail/squirrelmail/pkg/DEINSTALL b/mail/squirrelmail/pkg/DEINSTALL index b0fe12e08c2..fb5679fd32f 100644 --- a/mail/squirrelmail/pkg/DEINSTALL +++ b/mail/squirrelmail/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.4 2001/04/30 05:35:45 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.5 2001/07/13 07:09:20 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -24,13 +25,13 @@ DEINSTALL) # FILE=${DATADIR}/data/default_pref SAMPLEFILE=${SMDIR}/data/default_pref - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi FILE=${CONFDIR}/squirrelmail.conf SAMPLEFILE=${SAMPLECONFDIR}/squirrelmail.conf - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/misc/vfu/Makefile b/misc/vfu/Makefile index 1a0b3f47d55..3f1e7b0b933 100644 --- a/misc/vfu/Makefile +++ b/misc/vfu/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2001/06/20 05:29:22 jlam Exp $ +# $NetBSD: Makefile,v 1.23 2001/07/13 07:09:20 jlam Exp $ # DISTNAME= vfu-3.01 @@ -22,6 +22,7 @@ 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!@/} diff --git a/misc/vfu/pkg/DEINSTALL b/misc/vfu/pkg/DEINSTALL index 7bdba62b8e2..5ead7ddc074 100644 --- a/misc/vfu/pkg/DEINSTALL +++ b/misc/vfu/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/06/20 05:27:33 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:20 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples/vfu @@ -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 diff --git a/net/samba/Makefile b/net/samba/Makefile index 83add6fe815..a3f45eeebfa 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.59 2001/06/24 07:55:22 taca Exp $ +# $NetBSD: Makefile,v 1.60 2001/07/13 07:09:20 jlam Exp $ DISTNAME= samba-2.2.0a PKGNAME= samba-2.2.0nb2 @@ -77,6 +77,7 @@ FILES_SUBST+= PREFIX=${PREFIX} 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+= ECHO=${ECHO:Q} FILES_SUBST+= MKDIR=${MKDIR:Q} diff --git a/net/samba/pkg/DEINSTALL b/net/samba/pkg/DEINSTALL index ec73f7f892a..9e78126dc49 100644 --- a/net/samba/pkg/DEINSTALL +++ b/net/samba/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.4 2001/06/19 09:06:05 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.5 2001/07/13 07:09:21 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -25,7 +26,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.sample - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/net/vtun/Makefile b/net/vtun/Makefile index 3d848ee24c4..d35adc38b1c 100644 --- a/net/vtun/Makefile +++ b/net/vtun/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2001/06/12 20:33:07 jlam Exp $ +# $NetBSD: Makefile,v 1.12 2001/07/13 07:09:21 jlam Exp $ DISTNAME= vtun-2.4 CATEGORIES= net @@ -30,19 +30,20 @@ VTUN_SYSCONFDIR?=${LOCALBASE}/etc CONFIGURE_ARGS+=--sysconfdir=${VTUN_SYSCONFDIR} BUILD_DEFS+= VTUN_SYSCONFDIR +FILES_SUBST= VTUN_SYSCONFDIR=${VTUN_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+= RM=${RM:Q} +FILES_SUBST+= RMDIR=${RMDIR:Q} +FILES_SUBST+= TRUE=${TRUE: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" \ - -e "s|@RMDIR@|${RMDIR}|g" \ - -e "s|@TRUE@|${TRUE}|g" \ - -e "s|@VTUN_SYSCONFDIR@|${VTUN_SYSCONFDIR}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - @${SED} -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@MKDIR@|${MKDIR}|g" \ - -e "s|@VTUN_SYSCONFDIR@|${VTUN_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_PROGRAM} ${WRKSRC}/vtund ${PREFIX}/sbin diff --git a/net/vtun/pkg/DEINSTALL b/net/vtun/pkg/DEINSTALL index a4e741db4a1..7f6fd3a3c3a 100644 --- a/net/vtun/pkg/DEINSTALL +++ b/net/vtun/pkg/DEINSTALL @@ -1,11 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2001/05/13 19:02:48 kim Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:21 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -25,7 +26,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.example - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/pkgtools/buildlink-x11/Makefile b/pkgtools/buildlink-x11/Makefile index 6ffccea0626..5d827a5119d 100644 --- a/pkgtools/buildlink-x11/Makefile +++ b/pkgtools/buildlink-x11/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2001/07/05 17:23:00 jlam Exp $ +# $NetBSD: Makefile,v 1.4 2001/07/13 07:09:21 jlam Exp $ DISTNAME= buildlink-x11-0.6 CATEGORIES= pkgtools devel x11 @@ -19,19 +19,10 @@ USE_X11BASE= # defined DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL -.include "../../mk/bsd.prefs.mk" - -.if (${OPSYS} == SunOS) -DEPENDS+= diffutils>=2.7:../../devel/diffutils -DIFF= ${LOCALBASE}/bin/gdiff -.else -DIFF= /usr/bin/diff -.endif - FILES_SUBST= X11BASE=${X11BASE} FILES_SUBST+= PREFIX=${PREFIX} +FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} -FILES_SUBST+= DIFF=${DIFF:Q} FILES_SUBST+= GREP=${GREP:Q} FILES_SUBST+= RM=${RM:Q} FILES_SUBST+= RMDIR=${RMDIR:Q} diff --git a/pkgtools/buildlink-x11/pkg/DEINSTALL b/pkgtools/buildlink-x11/pkg/DEINSTALL index 57514d082cd..700edae5d2c 100644 --- a/pkgtools/buildlink-x11/pkg/DEINSTALL +++ b/pkgtools/buildlink-x11/pkg/DEINSTALL @@ -1,12 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1.1.1 2001/07/02 21:00:44 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:21 jlam Exp $ PKGNAME=$1 STAGE=$2 +CMP="@CMP@" CP="@CP@" -DIFF="@DIFF@" GREP="@GREP@" RM="@RM@" RMDIR="@RMDIR@" @@ -26,7 +26,7 @@ POST-DEINSTALL) ( ${GREP} -v buildlinkX11 ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF} ${RM} -f ${HOSTDEF}.bak if [ ${PKG_PREFIX} != ${X11BASE} ] && \ - ${DIFF} -q ${X11_HOSTDEF} ${HOSTDEF} >/dev/null + ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF} then ${RM} -f ${HOSTDEF} fi diff --git a/pkgtools/xpkgwedge/Makefile b/pkgtools/xpkgwedge/Makefile index 46ab684aa6d..68611586dbf 100644 --- a/pkgtools/xpkgwedge/Makefile +++ b/pkgtools/xpkgwedge/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2001/07/10 00:58:32 hubertf Exp $ +# $NetBSD: Makefile,v 1.28 2001/07/13 07:09:22 jlam Exp $ # DISTNAME= xpkgwedge-1.6 @@ -18,19 +18,10 @@ NO_CHECKSUM= # defined DEINSTALL_FILE= ${WRKDIR}/DEINSTALL INSTALL_FILE= ${WRKDIR}/INSTALL -.include "../../mk/bsd.prefs.mk" - -.if (${OPSYS} == SunOS) -DEPENDS+= diffutils>=2.7:../../devel/diffutils -DIFF= ${LOCALBASE}/bin/gdiff -.else -DIFF= /usr/bin/diff -.endif - FILES_SUBST= X11BASE=${X11BASE} FILES_SUBST+= PREFIX=${PREFIX} +FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} -FILES_SUBST+= DIFF=${DIFF:Q} FILES_SUBST+= GREP=${GREP:Q} FILES_SUBST+= RM=${RM:Q} FILES_SUBST+= RMDIR=${RMDIR:Q} diff --git a/pkgtools/xpkgwedge/pkg/DEINSTALL b/pkgtools/xpkgwedge/pkg/DEINSTALL index 841fcd8bad9..ce75e844876 100755 --- a/pkgtools/xpkgwedge/pkg/DEINSTALL +++ b/pkgtools/xpkgwedge/pkg/DEINSTALL @@ -1,12 +1,12 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.8 2001/07/10 00:57:11 hubertf Exp $ +# $NetBSD: DEINSTALL,v 1.9 2001/07/13 07:09:22 jlam Exp $ PKGNAME=$1 STAGE=$2 +CMP="@CMP@" CP="@CP@" -DIFF="@DIFF@" GREP="@GREP@" RM="@RM@" RMDIR="@RMDIR@" @@ -27,7 +27,7 @@ POST-DEINSTALL) ${RM} -f ${HOSTDEF}.bak if [ ${PKG_PREFIX} != ${X11BASE} ] && \ [ -f ${X11_HOSTDEF} ] && \ - ${DIFF} -q ${X11_HOSTDEF} ${HOSTDEF} >/dev/null + ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF} then ${RM} -f ${HOSTDEF} fi diff --git a/print/LPRng-core/Makefile b/print/LPRng-core/Makefile index c49d9ea5584..98e9a3c4df3 100644 --- a/print/LPRng-core/Makefile +++ b/print/LPRng-core/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2001/02/17 17:51:34 wiz Exp $ +# $NetBSD: Makefile,v 1.5 2001/07/13 07:09:22 jlam Exp $ # FreeBSD Id: Makefile,v 1.5 1998/10/21 00:57:27 steve Exp # @@ -52,6 +52,14 @@ EXAMPLES_DIR= ${PREFIX}/share/examples/LPRng 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+= TRUE=${TRUE:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + pre-patch: ${MV} ${WRKSRC}/man/lpd.conf.5 ${WRKSRC}/man/lpd.conf.5.in @@ -66,14 +74,8 @@ post-configure: pre-install: ${SED} -e "s,@PREFIX@,${PREFIX},g" \ < ${FILESDIR}/LPRng.sh > ${WRKDIR}/LPRng.sh - ${SED} -e "s,@CAT@,${CAT},g" \ - -e "s,@RM@,${RM},g" \ - -e "s,@RMDIR@,${RMDIR},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_SCRIPT} ${WRKDIR}/LPRng.sh ${PREFIX}/etc/rc.d/LPRng diff --git a/print/LPRng-core/pkg/DEINSTALL b/print/LPRng-core/pkg/DEINSTALL index 4d9f35838a7..5d93a6632b9 100644 --- a/print/LPRng-core/pkg/DEINSTALL +++ b/print/LPRng-core/pkg/DEINSTALL @@ -1,13 +1,13 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2000/12/28 00:13:09 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:22 jlam Exp $ PKGNAME=$1 STAGE=$2 CAT="@CAT@" +CMP="@CMP@" RM="@RM@" -RMDIR="@RMDIR@" SAMPLECONFDIR=${PKG_PREFIX}/share/examples/LPRng CONFDIR=/etc @@ -23,7 +23,7 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file}.example - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then ${RM} -f ${FILE} fi diff --git a/print/cups/Makefile b/print/cups/Makefile index 98f496459e3..608a482af1e 100644 --- a/print/cups/Makefile +++ b/print/cups/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2001/06/19 08:39:33 jlam Exp $ +# $NetBSD: Makefile,v 1.34 2001/07/13 07:09:23 jlam Exp $ DISTNAME= cups-${VERS}-source PKGNAME= cups-${VERS} @@ -85,6 +85,7 @@ FILES_SUBST+= CAT=${CAT:Q} FILES_SUBST+= CHGRP=${CHGRP:Q} FILES_SUBST+= CHMOD=${CHMOD:Q} FILES_SUBST+= CHOWN=${CHOWN:Q} +FILES_SUBST+= CMP=${CMP:Q} FILES_SUBST+= CP=${CP:Q} FILES_SUBST+= GREP=${GREP:Q} FILES_SUBST+= MKDIR=${MKDIR:Q} diff --git a/print/cups/pkg/DEINSTALL b/print/cups/pkg/DEINSTALL index ac6524d3288..79370d3d8b9 100644 --- a/print/cups/pkg/DEINSTALL +++ b/print/cups/pkg/DEINSTALL @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.6 2001/01/28 02:05:38 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.7 2001/07/13 07:09:23 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -9,6 +9,7 @@ USER="@CUPS_USER@" GROUP="@CUPS_GROUP@" CAT="@CAT@" +CMP="@CMP@" RM="@RM@" RMDIR="@RMDIR@" TRUE="@TRUE@" @@ -29,7 +30,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/security/sudo/Makefile b/security/sudo/Makefile index 539a3782195..7f6b08df2a2 100644 --- a/security/sudo/Makefile +++ b/security/sudo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2001/06/26 00:49:54 wiz Exp $ +# $NetBSD: Makefile,v 1.37 2001/07/13 07:09:23 jlam Exp $ # DISTNAME= sudo-1.6.3p7 @@ -38,6 +38,21 @@ PLIST_SRC+= ${PKGDIR}/PLIST.${LOWER_OPSYS} DOCDIR= ${PREFIX}/share/doc/sudo EGDIR= ${PREFIX}/share/examples/sudo +DEINSTALL_FILE= ${WRKDIR}/DEINSTALL +INSTALL_FILE= ${WRKDIR}/INSTALL + +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+= RM=${RM:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + +pre-install: + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} + post-install: ${INSTALL_DATA_DIR} ${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/UPGRADE ${DOCDIR} diff --git a/security/sudo/pkg/DEINSTALL b/security/sudo/pkg/DEINSTALL index 92722a32e51..c2986909560 100644 --- a/security/sudo/pkg/DEINSTALL +++ b/security/sudo/pkg/DEINSTALL @@ -1,10 +1,14 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2000/12/06 06:33:40 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:23 jlam Exp $ PKGNAME=$1 STAGE=$2 +CAT="@CAT@" +CMP="@CMP@" +RM="@RM@" + SAMPLECONFDIR=${PKG_PREFIX}/share/examples/sudo CONFDIR=/etc CONFFILES="sudoers" @@ -18,12 +22,13 @@ DEINSTALL) do FILE=${CONFDIR}/${file} SAMPLEFILE=${SAMPLECONFDIR}/${file} - if diff -q ${FILE} ${SAMPLEFILE} >/dev/null + if ${CMP} -s ${FILE} ${SAMPLEFILE} then - rm -f ${FILE} + ${RM} -f ${FILE} fi done ;; + POST-DEINSTALL) modified_files='' for file in ${CONFFILES} @@ -36,7 +41,7 @@ POST-DEINSTALL) done if [ -n "${modified_files}" ] then - cat << EOF + ${CAT} << EOF =========================================================================== If you won't be using ${PKGNAME} any longer, you may want to remove the following files: @@ -46,11 +51,12 @@ EOF do echo " ${file}" done - cat << EOF + ${CAT} << EOF =========================================================================== EOF fi ;; + *) echo "Unexpected argument: ${STAGE}" exit 1 diff --git a/security/sudo/pkg/INSTALL b/security/sudo/pkg/INSTALL index f68c418762c..76d747ccc4a 100755 --- a/security/sudo/pkg/INSTALL +++ b/security/sudo/pkg/INSTALL @@ -1,10 +1,15 @@ #! /bin/sh # -# $NetBSD: INSTALL,v 1.3 2000/12/06 06:33:40 jlam Exp $ +# $NetBSD: INSTALL,v 1.4 2001/07/13 07:09:24 jlam Exp $ PKGNAME=$1 STAGE=$2 +CAT="@CAT@" +CHOWN="@CHOWN@" +CHMOD="@CHMOD@" +CP="@CP@" + SAMPLECONFDIR=${PKG_PREFIX}/share/examples/sudo CONFDIR=/etc CONFFILES="sudoers" @@ -12,6 +17,7 @@ CONFFILES="sudoers" case ${STAGE} in PRE-INSTALL) ;; + POST-INSTALL) echo "Installing configuration files:" for file in ${CONFFILES} @@ -23,12 +29,12 @@ POST-INSTALL) echo " ${FILE} already exists" else echo " ${FILE}" - cp ${SAMPLEFILE} ${FILE} - chown 0:0 ${FILE} - chmod 0440 ${FILE} + ${CP} ${SAMPLEFILE} ${FILE} + ${CHOWN} 0:0 ${FILE} + ${CHMOD} 0440 ${FILE} fi done - cat << EOF + ${CAT} << EOF =========================================================================== Some files you might need to customize include the following: @@ -38,10 +44,11 @@ EOF FILE=${CONFDIR}/${file} echo " ${FILE}" done - cat << EOF + ${CAT} << EOF =========================================================================== EOF ;; + *) echo "Unexpected argument: ${STAGE}" exit 1 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 |