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/cvsweb | |
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/cvsweb')
-rw-r--r-- | www/cvsweb/Makefile | 26 | ||||
-rw-r--r-- | www/cvsweb/pkg/DEINSTALL | 5 |
2 files changed, 16 insertions, 15 deletions
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 |