pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators Cleanup fallout from {DE,}INSTALL_SRC remova...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/61f87d376b20
branches:  trunk
changeset: 514878:61f87d376b20
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Jun 19 23:24:21 2006 +0000

description:
Cleanup fallout from {DE,}INSTALL_SRC removal: rewrite the INSTALL
script to be of the format expected by the pkginstall framework.
Also, split out the important text from the INSTALL script and put it
into a MESSAGE file.

Also, remove the unused show-shlib-type target.

diffstat:

 emulators/suse100_base/INSTALL           |  82 ++++++++-----------------------
 emulators/suse100_base/MESSAGE.DragonFly |   7 ++
 emulators/suse100_base/MESSAGE.FreeBSD   |   7 ++
 emulators/suse100_base/MESSAGE.NetBSD    |   6 ++
 emulators/suse100_linux/Makefile.common  |  15 ++++-
 emulators/suse91_base/INSTALL            |  81 ++++++++-----------------------
 emulators/suse91_base/MESSAGE.DragonFly  |   7 ++
 emulators/suse91_base/MESSAGE.FreeBSD    |   7 ++
 emulators/suse91_base/MESSAGE.NetBSD     |   6 ++
 emulators/suse91_base/Makefile           |   7 +-
 emulators/suse91_linux/Makefile.common   |  15 ++++-
 11 files changed, 107 insertions(+), 133 deletions(-)

diffs (truncated from 347 to 300 lines):

diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse100_base/INSTALL
--- a/emulators/suse100_base/INSTALL    Mon Jun 19 23:20:59 2006 +0000
+++ b/emulators/suse100_base/INSTALL    Mon Jun 19 23:24:21 2006 +0000
@@ -1,68 +1,30 @@
-#!/bin/sh
-# $NetBSD: INSTALL,v 1.1.1.1 2006/03/09 20:34:10 tonio Exp $
-
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
-emul=linux
-OPSYS=`/usr/bin/uname -s`
-
-cat <<EOF
-==============================================================================
-
-EOF
+# $NetBSD: INSTALL,v 1.2 2006/06/19 23:24:21 jlam Exp $
 
-if [ "$OPSYS" = "NetBSD" ]; then
-       cat <<-EOF
-       Do not forget to include COMPAT_LINUX (and EXEC_ELF32 on NetBSD systems older
-       than 1.5) in your kernel configuration file.  (Linux binaries require these
-       options in order to work.)
-       EOF
-fi
+case "${STAGE}" in
+POST-INSTALL)
+       emulsubdir=linux
 
-if [ "$OPSYS" = "FreeBSD" ]; then 
-       cat <<-EOF
-       Do not forget to include COMPAT_LINUX in your kernel configuration file.
-       You also need to load "linux.ko" kernel module (using kldload(8) or by
-       setting linux_enable="yes" in /etc/rc.conf.
-       EOF
-fi
+       emuldir="@OPSYS_EMULDIR@"
+       pkgemuldir="${PKG_PREFIX}/emul/$emulsubdir"
 
-if [ "$OPSYS" = "NetBSD" ]; then
-    if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \
-       "`cd / && cd /emul/$emul 2>/dev/null && pwd -P`" ]; then
-           if [ -e /emul/$emul -o -L /emul/$emul ] || \
-               [ \( -e /emul -o -L /emul \) -a ! -d /emul ]; then
-               cat <<-EOF
-
-               IMPORTANT:  You must create a symbolic link from /emul/$emul to
-               ${PKG_PREFIX}/emul/$emul in order for this package to work properly.
-               (It seems there is something else located at /emul/$emul.)
-               EOF
-           else
-               mkdir -p /emul
-               ln -sf ${PKG_PREFIX}/emul/$emul /emul/$emul
-           fi
-    fi
-fi
+       emuldir_pwd=`cd $emulsubdir 2>/dev/null && ${PWD_CMD}`
+       pkgemuldir_pwd=`cd $pkgemulsubdir 2>/dev/null && ${PWD_CMD}`
 
-if [ "$OPSYS" = "FreeBSD" ]; then
-    if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \
-       "`cd / && cd /compat/$emul 2>/dev/null && pwd -P`" ]; then
-           if [ -e /compat/$emul -o -L /compat/$emul ] || \
-               [ \( -e /compat -o -L /compat \) -a ! -d /compat ]; then
-               cat <<-EOF
-                       
-               IMPORTANT:  You must create a symbolic link from /compat/$emul to
-               ${PKG_PREFIX}/emul/$emul in order for this package to work properly.
-               (It seems there is something else located at /compat/$emul.)
-               EOF
-           else
-               mkdir -p /compat
-               ln -sf ${PKG_PREFIX}/emul/$emul /compat/$emul
-           fi
-    fi
-fi
+       if ${TEST} "$emuldir_pwd" != "$pkgemuldir_pwd"; then
+               if ${TEST} -e $emuldir -o -L $emuldir; then
+                       ${CAT} << EOF
+==============================================================================
+You must create a symbolic link for ${PKGNAME} to work properly:
 
-cat <<EOF
+       $pkgemuldir  ->  $emuldir
 
+It seems there is something else located at $emuldir.
 ==============================================================================
 EOF
+               else
+                       ${MKDIR} -p `${DIRNAME} $emuldir` && 
+                       ${LN} -fs $pkgemuldir $emuldir
+               fi
+       fi
+       ;;
+esac
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse100_base/MESSAGE.DragonFly
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse100_base/MESSAGE.DragonFly  Mon Jun 19 23:24:21 2006 +0000
@@ -0,0 +1,7 @@
+==============================================================================
+$NetBSD: MESSAGE.DragonFly,v 1.1 2006/06/19 23:24:21 jlam Exp $
+
+Do not forget to include COMPAT_LINUX in your kernel configuration file.
+You will also need to load the "linux.ko" kernel module (using kldload(8)
+or by setting linux_enable=yes in /etc/rc.conf.
+==============================================================================
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse100_base/MESSAGE.FreeBSD
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse100_base/MESSAGE.FreeBSD    Mon Jun 19 23:24:21 2006 +0000
@@ -0,0 +1,7 @@
+==============================================================================
+$NetBSD: MESSAGE.FreeBSD,v 1.1 2006/06/19 23:24:21 jlam Exp $
+
+Do not forget to include COMPAT_LINUX in your kernel configuration file.
+You will also need to load the "linux.ko" kernel module (using kldload(8)
+or by setting linux_enable=yes in /etc/rc.conf.
+==============================================================================
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse100_base/MESSAGE.NetBSD
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse100_base/MESSAGE.NetBSD     Mon Jun 19 23:24:21 2006 +0000
@@ -0,0 +1,6 @@
+==============================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2006/06/19 23:24:21 jlam Exp $
+
+Do not forget to include COMPAT_LINUX in your kernel configuration file.
+Linux binaries require this option in order to work.
+==============================================================================
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse100_linux/Makefile.common
--- a/emulators/suse100_linux/Makefile.common   Mon Jun 19 23:20:59 2006 +0000
+++ b/emulators/suse100_linux/Makefile.common   Mon Jun 19 23:24:21 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.7 2006/06/19 20:22:33 jdolecek Exp $
+# $NetBSD: Makefile.common,v 1.8 2006/06/19 23:24:21 jlam Exp $
 
 .include "../../emulators/suse100_linux/vars.mk"
 .include "../../emulators/suse100_linux/arch.mk"
@@ -30,6 +30,16 @@
 EMULSUBDIR=            emul/linux
 EMULDIR=               ${PREFIX}/${EMULSUBDIR}
 
+# Set location of OPSYS-specific emulation directory
+.if ${OPSYS} == "NetBSD"
+OPSYS_EMULDIR=         /${EMULSUBDIR}
+.elif (${OPSYS} == "FreeBSD") || (${OPSYS} == "DragonFly")
+OPSYS_EMULDIR=         /compat/${EMULSUBDIR:T}
+.else
+OPSYS_EMULDIR=         /${EMULSUBDIR}
+.endif
+FILES_SUBST+=          OPSYS_EMULDIR=${OPSYS_EMULDIR:Q}
+
 RPM2PKG=               ${PREFIX}/sbin/rpm2pkg
 BUILD_DEPENDS+=                rpm2pkg>=2.1:../../pkgtools/rpm2pkg
 
@@ -89,6 +99,3 @@
          ${RM} -f ${PLIST_SRC}.old; \
        fi
 .endif
-
-show-shlib-type:
-       @${ECHO} linux-${MACHINE_ARCH}
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse91_base/INSTALL
--- a/emulators/suse91_base/INSTALL     Mon Jun 19 23:20:59 2006 +0000
+++ b/emulators/suse91_base/INSTALL     Mon Jun 19 23:24:21 2006 +0000
@@ -1,68 +1,29 @@
-#!/bin/sh
-# $NetBSD: INSTALL,v 1.1.1.1 2004/07/13 10:31:13 tron Exp $
-
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
-emul=linux
-OPSYS=`/usr/bin/uname -s`
-
-cat <<EOF
-==============================================================================
-
-EOF
+# $NetBSD: INSTALL,v 1.2 2006/06/19 23:25:48 jlam Exp $
 
-if [ "$OPSYS" = "NetBSD" ]; then
-       cat <<-EOF
-       Do not forget to include COMPAT_LINUX (and EXEC_ELF32 on NetBSD systems older
-       than 1.5) in your kernel configuration file.  (Linux binaries require these
-       options in order to work.)
-       EOF
-fi
+case "${STAGE}" in
+POST-INSTALL)
+       emulsubdir=linux
 
-if [ "$OPSYS" = "FreeBSD" ]; then 
-       cat <<-EOF
-       Do not forget to include COMPAT_LINUX in your kernel configuration file.
-       You also need to load "linux.ko" kernel module (using kldload(8) or by
-       setting linux_enable="yes" in /etc/rc.conf.
-       EOF
-fi
+       emuldir="@OPSYS_EMULDIR@"
+       pkgemuldir="${PKG_PREFIX}/emul/$emulsubdir"
 
-if [ "$OPSYS" = "NetBSD" ]; then
-    if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \
-       "`cd / && cd /emul/$emul 2>/dev/null && pwd -P`" ]; then
-           if [ -e /emul/$emul -o -L /emul/$emul ] || \
-               [ \( -e /emul -o -L /emul \) -a ! -d /emul ]; then
-               cat <<-EOF
-
-               IMPORTANT:  You must create a symbolic link from /emul/$emul to
-               ${PKG_PREFIX}/emul/$emul in order for this package to work properly.
-               (It seems there is something else located at /emul/$emul.)
-               EOF
-           else
-               mkdir -p /emul
-               ln -sf ${PKG_PREFIX}/emul/$emul /emul/$emul
-           fi
-    fi
-fi
+       emuldir_pwd=`cd $emulsubdir 2>/dev/null && ${PWD_CMD}`
+       pkgemuldir_pwd=`cd $pkgemulsubdir 2>/dev/null && ${PWD_CMD}`
 
-if [ "$OPSYS" = "FreeBSD" ]; then
-    if [ "`cd /etc && cd ${PKG_PREFIX}/emul/$emul 2>/dev/null && pwd -P`" != \
-       "`cd / && cd /compat/$emul 2>/dev/null && pwd -P`" ]; then
-           if [ -e /compat/$emul -o -L /compat/$emul ] || \
-               [ \( -e /compat -o -L /compat \) -a ! -d /compat ]; then
-               cat <<-EOF
-                       
-               IMPORTANT:  You must create a symbolic link from /compat/$emul to
-               ${PKG_PREFIX}/emul/$emul in order for this package to work properly.
-               (It seems there is something else located at /compat/$emul.)
-               EOF
-           else
-               mkdir -p /compat
-               ln -sf ${PKG_PREFIX}/emul/$emul /compat/$emul
-           fi
-    fi
-fi
+       if ${TEST} "$emuldir_pwd" != "$pkgemuldir_pwd"; then
+               if ${TEST} -e $emuldir -o -L $emuldir; then
+                       ${CAT} << EOF
+==============================================================================
+You must create a symbolic link for ${PKGNAME} to work properly:
 
-cat <<EOF
+       $pkgemuldir  ->  $emuldir
 
+It seems there is something else located at $emuldir.
 ==============================================================================
 EOF
+               else
+                       ${MKDIR} -p /emul && ${LN} -fs $pkgemuldir $emuldir
+               fi
+       fi
+       ;;
+esac
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse91_base/MESSAGE.DragonFly
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse91_base/MESSAGE.DragonFly   Mon Jun 19 23:24:21 2006 +0000
@@ -0,0 +1,7 @@
+==============================================================================
+$NetBSD: MESSAGE.DragonFly,v 1.1 2006/06/19 23:25:48 jlam Exp $
+
+Do not forget to include COMPAT_LINUX in your kernel configuration file.
+You will also need to load the "linux.ko" kernel module (using kldload(8)
+or by setting linux_enable=yes in /etc/rc.conf.
+==============================================================================
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse91_base/MESSAGE.FreeBSD
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse91_base/MESSAGE.FreeBSD     Mon Jun 19 23:24:21 2006 +0000
@@ -0,0 +1,7 @@
+==============================================================================
+$NetBSD: MESSAGE.FreeBSD,v 1.1 2006/06/19 23:25:48 jlam Exp $
+
+Do not forget to include COMPAT_LINUX in your kernel configuration file.
+You will also need to load the "linux.ko" kernel module (using kldload(8)
+or by setting linux_enable=yes in /etc/rc.conf.
+==============================================================================
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse91_base/MESSAGE.NetBSD
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/suse91_base/MESSAGE.NetBSD      Mon Jun 19 23:24:21 2006 +0000
@@ -0,0 +1,6 @@
+==============================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2006/06/19 23:25:48 jlam Exp $
+
+Do not forget to include COMPAT_LINUX in your kernel configuration file.
+Linux binaries require this option in order to work.
+==============================================================================
diff -r 5290e4428fdd -r 61f87d376b20 emulators/suse91_base/Makefile
--- a/emulators/suse91_base/Makefile    Mon Jun 19 23:20:59 2006 +0000
+++ b/emulators/suse91_base/Makefile    Mon Jun 19 23:24:21 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.21 2006/03/14 01:14:28 jlam Exp $
+# $NetBSD: Makefile,v 1.22 2006/06/19 23:25:48 jlam Exp $
 
 DISTNAME=              suse_base-${SUSE_VERSION}
-PKGREVISION=           9
+PKGREVISION=           10
 CATEGORIES=            emulators
 MASTER_SITES=          ${MASTER_SITE_SUSE91}
 DISTFILES=             ${RPMFILES}
@@ -17,8 +17,6 @@
 CHECK_FILES_SKIP+=      ${PREFIX}/${EMULSUBDIR}/etc/ld.so.cache
 



Home | Main Index | Thread Index | Old Index