diff options
author | jlam <jlam@pkgsrc.org> | 2001-07-13 07:09:17 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-07-13 07:09:17 +0000 |
commit | 9820a22a904f7576bb8724416da2edafe7a03b8e (patch) | |
tree | 6f97936deeb9a539bc07b5007be8c72a20640428 /pkgtools/buildlink-x11 | |
parent | d3bc280f5563750d61a3f8c7dcd95a634e4fda1a (diff) | |
download | pkgsrc-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 'pkgtools/buildlink-x11')
-rw-r--r-- | pkgtools/buildlink-x11/Makefile | 13 | ||||
-rw-r--r-- | pkgtools/buildlink-x11/pkg/DEINSTALL | 6 |
2 files changed, 5 insertions, 14 deletions
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 |