diff options
author | jlam <jlam@pkgsrc.org> | 2003-08-30 11:08:22 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-08-30 11:08:22 +0000 |
commit | 5b05dc82730c6749a344705d615e6d943b8182a9 (patch) | |
tree | 8d9c6076949c025c9786b42703873e77f9d51a10 /pkgtools/xpkgwedge | |
parent | e635b910494a18c0bcc1c516ff54d0d6223f94ff (diff) | |
download | pkgsrc-5b05dc82730c6749a344705d615e6d943b8182a9.tar.gz |
Modernize this package a bit:
* Use bsd.pkg.install.mk instead of supplying custom INSTALL/DEINSTALL
scripts.
* Note that this package doesn't really use buildlink.
* Remove ancient BUILDLINK_DEPENDS= line at the bottom of the file that
we no longer need since the buildlink1 days of yore.
Diffstat (limited to 'pkgtools/xpkgwedge')
-rwxr-xr-x | pkgtools/xpkgwedge/DEINSTALL | 41 | ||||
-rw-r--r-- | pkgtools/xpkgwedge/INSTALL | 41 | ||||
-rw-r--r-- | pkgtools/xpkgwedge/Makefile | 45 |
3 files changed, 24 insertions, 103 deletions
diff --git a/pkgtools/xpkgwedge/DEINSTALL b/pkgtools/xpkgwedge/DEINSTALL index 99c73ae44bc..739143284b0 100755 --- a/pkgtools/xpkgwedge/DEINSTALL +++ b/pkgtools/xpkgwedge/DEINSTALL @@ -1,34 +1,17 @@ -#!/bin/sh -# -# $NetBSD: DEINSTALL,v 1.2 2002/02/26 21:49:05 jlam Exp $ - -PKGNAME=$1 -STAGE=$2 - -CMP="@CMP@" -CP="@CP@" -ECHO="@ECHO@" -GREP="@GREP@" -RM="@RM@" -RMDIR="@RMDIR@" -TRUE="@TRUE@" +# $NetBSD: DEINSTALL,v 1.3 2003/08/30 11:08:22 jlam Exp $ FONT_PROGS="@FONT_PROGS@" X11BASE=@X11BASE@ + X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def case ${STAGE} in -DEINSTALL) - ;; - POST-DEINSTALL) - for prog in ${FONT_PROGS} - do - if [ -f ${PKG_PREFIX}/bin/${prog} -a \ - ${PKG_PREFIX} != ${X11BASE} ] - then - ${RM} -f ${PKG_PREFIX}/bin/${prog} + for prog in ${FONT_PROGS}; do + if [ -f ${PKG_PREFIX}/bin/$prog -a \ + ${PKG_PREFIX} != ${X11BASE} ]; then + ${RM} -f ${PKG_PREFIX}/bin/$prog fi done @@ -36,19 +19,11 @@ POST-DEINSTALL) ${CP} -f ${HOSTDEF} ${HOSTDEF}.bak ( ${GREP} -v xpkgwedge ${HOSTDEF}.bak || ${TRUE} ) > ${HOSTDEF} ${RM} -f ${HOSTDEF}.bak - if [ ${PKG_PREFIX} != ${X11BASE} ] && \ - [ -f ${X11_HOSTDEF} ] && \ - ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF} - then + if [ ${PKG_PREFIX} != ${X11BASE} -a -f ${X11_HOSTDEF} ] && \ + ${CMP} -s ${X11_HOSTDEF} ${HOSTDEF}; then ${RM} -f ${HOSTDEF} fi ${ECHO} "done." ${RMDIR} -p ${PKG_PREFIX}/lib/X11/config 2>/dev/null || ${TRUE} ;; - -*) - ${ECHO} "Unexpected argument: ${STAGE}" - exit 1 - ;; esac -exit 0 diff --git a/pkgtools/xpkgwedge/INSTALL b/pkgtools/xpkgwedge/INSTALL index 82d8928ed14..f8567223b12 100644 --- a/pkgtools/xpkgwedge/INSTALL +++ b/pkgtools/xpkgwedge/INSTALL @@ -1,44 +1,27 @@ -#!/bin/sh -# -# $NetBSD: INSTALL,v 1.3 2003/05/06 17:42:24 jmmv Exp $ - -PKGNAME=$1 -STAGE=$2 - -CP="@CP@" -ECHO="@ECHO@" -GREP="@GREP@" -LN="@LN@" -RM="@RM@" +# $NetBSD: INSTALL,v 1.4 2003/08/30 11:08:22 jlam Exp $ FONT_PROGS="@FONT_PROGS@" X11BASE=@X11BASE@ + X11_HOSTDEF=${X11BASE}/lib/X11/config/host.def HOSTDEF=${PKG_PREFIX}/lib/X11/config/host.def case ${STAGE} in -PRE-INSTALL) - ;; - POST-INSTALL) - for prog in ${FONT_PROGS} - do - if [ -f ${X11BASE}/bin/${prog} -a \ - ${PKG_PREFIX} != ${X11BASE} ] - then - ${LN} -fs ${X11BASE}/bin/${prog} \ - ${PKG_PREFIX}/bin/${prog} + for prog in ${FONT_PROGS}; do + if [ -f ${X11BASE}/bin/$prog -a \ + ${PKG_PREFIX} != ${X11BASE} ]; then + ${LN} -fs ${X11BASE}/bin/$prog \ + ${PKG_PREFIX}/bin/$prog fi done - if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ] - then + if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ]; then ${ECHO} -n "Updating ${HOSTDEF}..." ${CP} -f ${HOSTDEF} ${HOSTDEF}.bak else ${ECHO} -n "Creating ${HOSTDEF}..." - if [ -f ${X11_HOSTDEF} ] - then + if [ -f ${X11_HOSTDEF} ]; then ${CP} -f ${X11_HOSTDEF} ${HOSTDEF}.bak else ${CP} -f /dev/null ${HOSTDEF}.bak @@ -50,10 +33,4 @@ POST-INSTALL) ${RM} -f ${HOSTDEF}.bak ${ECHO} "done." ;; - -*) - ${ECHO} "Unexpected argument: ${STAGE}" - exit 1 - ;; esac -exit 0 diff --git a/pkgtools/xpkgwedge/Makefile b/pkgtools/xpkgwedge/Makefile index 87ecd205d84..c63d4bdac89 100644 --- a/pkgtools/xpkgwedge/Makefile +++ b/pkgtools/xpkgwedge/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2003/07/21 17:14:11 martti Exp $ +# $NetBSD: Makefile,v 1.39 2003/08/30 11:08:23 jlam Exp $ DISTNAME= xpkgwedge-1.7 WRKSRC= ${WRKDIR} @@ -14,57 +14,26 @@ NOT_FOR_PLATFORM= SunOS-*-* EXTRACT_ONLY= # empty NO_CONFIGURE= # defined +NO_BUILDLINK= # defined NO_CHECKSUM= # defined -USE_BUILDLINK2= # defined - -DEINSTALL_FILE= ${WRKDIR}/DEINSTALL -INSTALL_FILE= ${WRKDIR}/INSTALL +USE_PKGINSTALL= YES +USE_X11= YES # FONT_PROGS are symlinked from ${X11BASE}/bin to ${PREFIX}/bin to allow # ${PREFIX}/bin/${prog} to always work. # FONT_PROGS= bdftopcf fstobdf mkfontdir -FILES_SUBST= FONT_PROGS=${FONT_PROGS:Q} -FILES_SUBST+= X11BASE=${X11BASE} -FILES_SUBST+= PREFIX=${PREFIX} -FILES_SUBST+= CMP=${CMP:Q} -FILES_SUBST+= CP=${CP:Q} -FILES_SUBST+= ECHO=${ECHO:Q} -FILES_SUBST+= GREP=${GREP:Q} -FILES_SUBST+= LN=${LN:Q} -FILES_SUBST+= MAKE=${MAKE: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-extract: - @if [ ! -f ${X11BASE}/include/X11/X.h ]; then \ - ${ECHO} 'xpkgwedge requires $$X11BASE to point to the real X distribution.'; \ - ${ECHO} 'If you are setting this variable in mk.conf, fix or remove the setting'; \ - ${ECHO} 'and then install xpkgwedge.'; \ - ${FALSE}; \ - fi +FILES_SUBST+= FONT_PROGS=${FONT_PROGS:Q} +FILES_SUBST+= MAKE=${MAKE_PROGRAM:Q} do-build: - ${SED} ${FILES_SUBST_SED} ${FILESDIR}/pkgxmkmf.in > ${WRKDIR}/pkgxmkmf - -pre-install: - ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} - ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} + @${SED} ${FILES_SUBST_SED} ${FILESDIR}/pkgxmkmf.in > ${WRKDIR}/pkgxmkmf do-install: ${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/config ${INSTALL_DATA} ${FILESDIR}/xpkgwedge.def ${PREFIX}/lib/X11/config ${INSTALL_SCRIPT} ${WRKSRC}/pkgxmkmf ${PREFIX}/bin/pkgxmkmf -post-install: - PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL - .include "../../mk/bsd.pkg.mk" - -# Clear the build dependencies list so that xpkgwedge will not be recursively -# dependent on itself. -BUILD_DEPENDS= |