summaryrefslogtreecommitdiff
path: root/www/thttpd
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-07-13 07:09:17 +0000
committerjlam <jlam@pkgsrc.org>2001-07-13 07:09:17 +0000
commit9820a22a904f7576bb8724416da2edafe7a03b8e (patch)
tree6f97936deeb9a539bc07b5007be8c72a20640428 /www/thttpd
parentd3bc280f5563750d61a3f8c7dcd95a634e4fda1a (diff)
downloadpkgsrc-9820a22a904f7576bb8724416da2edafe7a03b8e.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/Makefile18
-rw-r--r--www/thttpd/pkg/DEINSTALL5
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