summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-19 23:24:21 +0000
committerjlam <jlam>2006-06-19 23:24:21 +0000
commit87b45d4855f830cc2fad7444a89ddac7b34cc723 (patch)
tree94e9237cce677be8473d5ef11a1119b7df8d9297 /emulators
parent49dfc68a29648fb0b9a65dec214b7d36e20bed3b (diff)
downloadpkgsrc-87b45d4855f830cc2fad7444a89ddac7b34cc723.tar.gz
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 (limited to 'emulators')
-rw-r--r--emulators/suse100_base/INSTALL82
-rw-r--r--emulators/suse100_base/MESSAGE.DragonFly7
-rw-r--r--emulators/suse100_base/MESSAGE.FreeBSD7
-rw-r--r--emulators/suse100_base/MESSAGE.NetBSD6
-rw-r--r--emulators/suse100_linux/Makefile.common15
-rw-r--r--emulators/suse91_base/INSTALL81
-rw-r--r--emulators/suse91_base/MESSAGE.DragonFly7
-rw-r--r--emulators/suse91_base/MESSAGE.FreeBSD7
-rw-r--r--emulators/suse91_base/MESSAGE.NetBSD6
-rw-r--r--emulators/suse91_base/Makefile7
-rw-r--r--emulators/suse91_linux/Makefile.common15
11 files changed, 107 insertions, 133 deletions
diff --git a/emulators/suse100_base/INSTALL b/emulators/suse100_base/INSTALL
index fbae38ccb8d..6e8ec94ada5 100644
--- a/emulators/suse100_base/INSTALL
+++ b/emulators/suse100_base/INSTALL
@@ -1,68 +1,30 @@
-#!/bin/sh
-# $NetBSD: INSTALL,v 1.1.1.1 2006/03/09 20:34:10 tonio Exp $
+# $NetBSD: INSTALL,v 1.2 2006/06/19 23:24:21 jlam Exp $
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
-emul=linux
-OPSYS=`/usr/bin/uname -s`
+case "${STAGE}" in
+POST-INSTALL)
+ emulsubdir=linux
-cat <<EOF
-==============================================================================
-
-EOF
-
-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
+ emuldir="@OPSYS_EMULDIR@"
+ pkgemuldir="${PKG_PREFIX}/emul/$emulsubdir"
-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_pwd=`cd $emulsubdir 2>/dev/null && ${PWD_CMD}`
+ pkgemuldir_pwd=`cd $pkgemulsubdir 2>/dev/null && ${PWD_CMD}`
-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
-
-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 --git a/emulators/suse100_base/MESSAGE.DragonFly b/emulators/suse100_base/MESSAGE.DragonFly
new file mode 100644
index 00000000000..ad7982f820c
--- /dev/null
+++ b/emulators/suse100_base/MESSAGE.DragonFly
@@ -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 --git a/emulators/suse100_base/MESSAGE.FreeBSD b/emulators/suse100_base/MESSAGE.FreeBSD
new file mode 100644
index 00000000000..d31f10c9a2e
--- /dev/null
+++ b/emulators/suse100_base/MESSAGE.FreeBSD
@@ -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 --git a/emulators/suse100_base/MESSAGE.NetBSD b/emulators/suse100_base/MESSAGE.NetBSD
new file mode 100644
index 00000000000..2019ec634e5
--- /dev/null
+++ b/emulators/suse100_base/MESSAGE.NetBSD
@@ -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 --git a/emulators/suse100_linux/Makefile.common b/emulators/suse100_linux/Makefile.common
index f7da5e61e2c..7e2e919b025 100644
--- a/emulators/suse100_linux/Makefile.common
+++ b/emulators/suse100_linux/Makefile.common
@@ -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 @@ MANCOMPRESSED?= yes
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 @@ do-install:
${RM} -f ${PLIST_SRC}.old; \
fi
.endif
-
-show-shlib-type:
- @${ECHO} linux-${MACHINE_ARCH}
diff --git a/emulators/suse91_base/INSTALL b/emulators/suse91_base/INSTALL
index c1e09085303..a10aae1fcd6 100644
--- a/emulators/suse91_base/INSTALL
+++ b/emulators/suse91_base/INSTALL
@@ -1,68 +1,29 @@
-#!/bin/sh
-# $NetBSD: INSTALL,v 1.1.1.1 2004/07/13 10:31:13 tron Exp $
+# $NetBSD: INSTALL,v 1.2 2006/06/19 23:25:48 jlam Exp $
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
-emul=linux
-OPSYS=`/usr/bin/uname -s`
+case "${STAGE}" in
+POST-INSTALL)
+ emulsubdir=linux
-cat <<EOF
-==============================================================================
-
-EOF
-
-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
+ emuldir="@OPSYS_EMULDIR@"
+ pkgemuldir="${PKG_PREFIX}/emul/$emulsubdir"
-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_pwd=`cd $emulsubdir 2>/dev/null && ${PWD_CMD}`
+ pkgemuldir_pwd=`cd $pkgemulsubdir 2>/dev/null && ${PWD_CMD}`
-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
-
-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 --git a/emulators/suse91_base/MESSAGE.DragonFly b/emulators/suse91_base/MESSAGE.DragonFly
new file mode 100644
index 00000000000..0b27df3566b
--- /dev/null
+++ b/emulators/suse91_base/MESSAGE.DragonFly
@@ -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 --git a/emulators/suse91_base/MESSAGE.FreeBSD b/emulators/suse91_base/MESSAGE.FreeBSD
new file mode 100644
index 00000000000..6e22b0979f1
--- /dev/null
+++ b/emulators/suse91_base/MESSAGE.FreeBSD
@@ -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 --git a/emulators/suse91_base/MESSAGE.NetBSD b/emulators/suse91_base/MESSAGE.NetBSD
new file mode 100644
index 00000000000..3323551a423
--- /dev/null
+++ b/emulators/suse91_base/MESSAGE.NetBSD
@@ -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 --git a/emulators/suse91_base/Makefile b/emulators/suse91_base/Makefile
index c163f437365..627b1600ae8 100644
--- a/emulators/suse91_base/Makefile
+++ b/emulators/suse91_base/Makefile
@@ -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}/dev/.*
CHECK_FILES_SKIP+= ${PREFIX}/${EMULSUBDIR}/etc/ld.so.cache
EXTRACT_ONLY= # empty
-DEINSTALL_SRC= # empty
-INSTALL_SRC= ${PKGDIR}/INSTALL
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
PLIST_SUBST+= EMULSUBDIR=${EMULSUBDIR:Q} LINUX_LIB=${LINUX_LIB:Q}
@@ -77,7 +75,6 @@ do-install:
< ${LINUX_LDD} > ${LINUX_LDD}.new
${MV} ${LINUX_LDD}.new ${LINUX_LDD}
${CHMOD} +x ${LINUX_LDD}
- @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} - POST-INSTALL
.include "../../emulators/suse91_linux/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/suse91_linux/Makefile.common b/emulators/suse91_linux/Makefile.common
index e5f452e530c..84515a47c60 100644
--- a/emulators/suse91_linux/Makefile.common
+++ b/emulators/suse91_linux/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.14 2006/04/28 09:08:32 joerg Exp $
+# $NetBSD: Makefile.common,v 1.15 2006/06/19 23:25:48 jlam Exp $
.include "../../emulators/suse91_linux/vars.mk"
.include "../../emulators/suse91_linux/arch.mk"
@@ -29,6 +29,16 @@ MANCOMPRESSED?= yes
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
@@ -75,6 +85,3 @@ do-install:
${RM} -f ${PLIST_SRC}.old; \
fi
.endif
-
-show-shlib-type:
- @${ECHO} linux-${MACHINE_ARCH}