pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/compat12 Convert to use bsd.pkg.install.mk.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9a2ed54e5a4a
branches:  trunk
changeset: 460444:9a2ed54e5a4a
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Aug 30 18:53:07 2003 +0000

description:
Convert to use bsd.pkg.install.mk.

diffstat:

 emulators/compat12/DEINSTALL |  18 +++---------------
 emulators/compat12/INSTALL   |  22 +++++-----------------
 emulators/compat12/Makefile  |  23 +++++++----------------
 3 files changed, 15 insertions(+), 48 deletions(-)

diffs (133 lines):

diff -r 55dc8d6c4b4b -r 9a2ed54e5a4a emulators/compat12/DEINSTALL
--- a/emulators/compat12/DEINSTALL      Sat Aug 30 18:48:34 2003 +0000
+++ b/emulators/compat12/DEINSTALL      Sat Aug 30 18:53:07 2003 +0000
@@ -1,26 +1,14 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/10/31 23:52:19 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
+# $NetBSD: DEINSTALL,v 1.2 2003/08/30 18:53:07 jlam Exp $
 
 case ${STAGE} in
-DEINSTALL)
-       ;;
 POST-DEINSTALL)
        COMPAT_LIBDIR=@COMPAT_LIBDIR@
 
-       rmdir -p ${PKG_PREFIX}/${COMPAT_LIBDIR} 2>/dev/null || true
+       ${RMDIR} -p ${PKG_PREFIX}/${COMPAT_LIBDIR} 2>/dev/null || ${TRUE}
 
        # Regenerate the shared library cache.  This should work on either
        # a.out or on ELF with the 1.5 release.
        #
-       ( @LDCONFIG@ || true ) >/dev/null 2>&1
-       ;;
-*)
-       echo "Unexpected argument: ${STAGE}"
-       exit 1
+       ( @LDCONFIG@ || ${TRUE} ) >/dev/null 2>&1
        ;;
 esac
-exit 0
diff -r 55dc8d6c4b4b -r 9a2ed54e5a4a emulators/compat12/INSTALL
--- a/emulators/compat12/INSTALL        Sat Aug 30 18:48:34 2003 +0000
+++ b/emulators/compat12/INSTALL        Sat Aug 30 18:53:07 2003 +0000
@@ -1,13 +1,6 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/10/31 23:52:20 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
+# $NetBSD: INSTALL,v 1.2 2003/08/30 18:53:07 jlam Exp $
 
 case ${STAGE} in
-PRE-INSTALL)
-       ;;
 POST-INSTALL)
        MACHINE_ARCH=@MACHINE_ARCH@
        OBJECT_FMT=@OBJECT_FMT@
@@ -33,7 +26,7 @@
                        if [ -e /emul/$emul -o -L /emul/$emul ] || \
                           [ \( -e /emul -o -L /emul \) -a ! -d /emul ]
                        then
-                               cat <<EOF
+                               ${CAT} <<EOF
 ==============================================================================
        IMPORTANT:  You must create a symbolic link from /emul/$emul
        to ${PKG_PREFIX}/emul/$emul in order for this package to work
@@ -43,8 +36,8 @@
 ==============================================================================
 EOF
                        else
-                               mkdir -p /emul
-                               ln -sf ${PKG_PREFIX}/emul/$emul /emul/$emul
+                               ${MKDIR} -p /emul
+                               ${LN} -sf ${PKG_PREFIX}/emul/$emul /emul/$emul
                        fi
                fi
        fi
@@ -52,11 +45,6 @@
        # Regenerate the shared library cache.  This should work on either
        # a.out or on ELF with the 1.5 release.
        #
-       ( @LDCONFIG@ || true ) >/dev/null 2>&1
-       ;;
-*)
-       echo "Unexpected argument: ${STAGE}"
-       exit 1
+       ( @LDCONFIG@ || ${TRUE} ) >/dev/null 2>&1
        ;;
 esac
-exit 0
diff -r 55dc8d6c4b4b -r 9a2ed54e5a4a emulators/compat12/Makefile
--- a/emulators/compat12/Makefile       Sat Aug 30 18:48:34 2003 +0000
+++ b/emulators/compat12/Makefile       Sat Aug 30 18:53:07 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2003/07/17 21:35:21 grant Exp $
+# $NetBSD: Makefile,v 1.23 2003/08/30 18:53:07 jlam Exp $
 #
 
 DISTNAME=              compat12-${MACHINE_ARCH}
@@ -13,11 +13,15 @@
 ONLY_FOR_PLATFORM=     NetBSD-*-i386 NetBSD-*-m68k NetBSD-*-ns32k \
                        NetBSD-*-sparc
 
+NO_BUILD=              # defined
 NO_MTREE=              # defined
 SHLIB_HANDLING=                NO
+USE_PKGINSTALL=                YES
 
-DEINSTALL_FILE=                ${WRKDIR}/DEINSTALL
-INSTALL_FILE=          ${WRKDIR}/INSTALL
+FILES_SUBST+=          COMPAT_LIBDIR=${COMPAT_LIBDIR}
+FILES_SUBST+=          MACHINE_ARCH=${MACHINE_ARCH}
+FILES_SUBST+=          OBJECT_FMT=${OBJECT_FMT}
+FILES_SUBST+=          LDCONFIG=${LDCONFIG}
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -33,21 +37,8 @@
 
 PLIST_SUBST+=          COMPAT_LIBDIR=${COMPAT_LIBDIR}
 
-do-build:
-       ${SED}  -e "s,@MACHINE_ARCH@,${MACHINE_ARCH},g" \
-               -e "s,@COMPAT_LIBDIR@,${COMPAT_LIBDIR},g" \
-               -e "s,@LDCONFIG@,${LDCONFIG},g" \
-               < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
-       ${SED}  -e "s,@MACHINE_ARCH@,${MACHINE_ARCH},g" \
-               -e "s,@OBJECT_FMT@,${OBJECT_FMT},g" \
-               -e "s,@LDCONFIG@,${LDCONFIG},g" \
-               < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
-
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/${COMPAT_LIBDIR}
        ${INSTALL_DATA} ${WRKDIR}/lib*.so* ${PREFIX}/${COMPAT_LIBDIR}
 
-post-install:
-       PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
-
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index