diff options
author | jlam <jlam> | 2001-07-13 07:09:17 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-07-13 07:09:17 +0000 |
commit | 03a6dd6fa68b8924591bf7640f135f0b395084b2 (patch) | |
tree | 6f97936deeb9a539bc07b5007be8c72a20640428 /www/thttpd | |
parent | bb13b45fb37e28767db6b8129d33334a3c80e8ed (diff) | |
download | pkgsrc-03a6dd6fa68b8924591bf7640f135f0b395084b2.tar.gz |
In package Makefiles, create FILES_SUBST instead of duplicating sed
expression for substituting in DEINSTALL/INSTALL scripts. Use "${CMP} -s"
instead of "diff -q" since the former is more portable across OSes.
Diffstat (limited to 'www/thttpd')
-rw-r--r-- | www/thttpd/Makefile | 18 | ||||
-rw-r--r-- | www/thttpd/pkg/DEINSTALL | 5 |
2 files changed, 13 insertions, 10 deletions
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 |