summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-19 23:20:59 +0000
committerjlam <jlam@pkgsrc.org>2006-06-19 23:20:59 +0000
commitea184c8f99b1940058c84a51fb38357f9d013d0c (patch)
tree1ae63360bb727bd5540317c609d890a1b283bd32 /emulators
parent23716a3db6d6610a3bfa2b05032121fcd9a482ca (diff)
downloadpkgsrc-ea184c8f99b1940058c84a51fb38357f9d013d0c.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.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/freebsd_lib/INSTALL48
-rw-r--r--emulators/freebsd_lib/MESSAGE8
-rw-r--r--emulators/osf1_lib/INSTALL48
-rw-r--r--emulators/osf1_lib/MESSAGE6
-rw-r--r--emulators/osf1_lib/Makefile7
5 files changed, 60 insertions, 57 deletions
diff --git a/emulators/freebsd_lib/INSTALL b/emulators/freebsd_lib/INSTALL
index 975aeb7b90e..da11b01b1f5 100644
--- a/emulators/freebsd_lib/INSTALL
+++ b/emulators/freebsd_lib/INSTALL
@@ -1,34 +1,30 @@
-#!/bin/sh
-# $NetBSD: INSTALL,v 1.1 2001/10/31 23:52:39 zuntum Exp $
+# $NetBSD: INSTALL,v 1.2 2006/06/19 23:20:59 jlam Exp $
-emul=freebsd
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
+case "${STAGE}" in
+POST-INSTALL)
+ emulsubdir=freebsd
-cat <<EOF
-==============================================================================
-
-Do not forget to include COMPAT_FREEBSD in your kernel configuration file.
-(FreeBSD binaries require this option in order to work.)
-Note that FreeBSD ELF binaries are not yet supported with this package.
-EOF
+ emuldir="/emul/$emulsubdir"
+ pkgemuldir="${PKG_PREFIX}/emul/$emulsubdir"
-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
+ emuldir_pwd=`cd $emulsubdir 2>/dev/null && ${PWD_CMD}`
+ pkgemuldir_pwd=`cd $pkgemulsubdir 2>/dev/null && ${PWD_CMD}`
- 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
+ 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/freebsd_lib/MESSAGE b/emulators/freebsd_lib/MESSAGE
new file mode 100644
index 00000000000..30cc236404c
--- /dev/null
+++ b/emulators/freebsd_lib/MESSAGE
@@ -0,0 +1,8 @@
+==============================================================================
+$NetBSD: MESSAGE,v 1.1 2006/06/19 23:20:59 jlam Exp $
+
+Do not forget to include COMPAT_FREEBSD in your kernel configuration
+file. FreeBSD binaries require this option in order to work.
+
+Note that FreeBSD ELF binaries are not yet supported with this package.
+==============================================================================
diff --git a/emulators/osf1_lib/INSTALL b/emulators/osf1_lib/INSTALL
index 52061de287b..24671fe125d 100644
--- a/emulators/osf1_lib/INSTALL
+++ b/emulators/osf1_lib/INSTALL
@@ -1,33 +1,31 @@
-#!/bin/sh
-# $NetBSD: INSTALL,v 1.1 2001/10/31 23:53:11 zuntum Exp $
+# $NetBSD: INSTALL,v 1.2 2006/06/19 23:22:29 jlam Exp $
-emul=osf1
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
+case "${STAGE}" in
+POST-INSTALL)
+ emulsubdir=osf1
-cat <<EOF
-==============================================================================
-
-Do not forget to include COMPAT_OSF1 in your kernel configuration
-file. (OSF/1 binaries require this option in order to work.)
-EOF
+ emuldir="/emul/$emulsubdir"
+ pkgemuldir="${PKG_PREFIX}/emul/$emulsubdir"
-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
+ emuldir_pwd=`cd $emulsubdir 2>/dev/null && ${PWD_CMD}`
+ pkgemuldir_pwd=`cd $pkgemulsubdir 2>/dev/null && ${PWD_CMD}`
- 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
+ if ${TEST} "$emuldir_pwd" != "$pkgemuldir_pwd"; then
+ if ${TEST} -e $emuldir -o -L $emuldir ||
+ ${TEST} \( -e /emul -o -L /emul \) -a ! -d /emul; 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/osf1_lib/MESSAGE b/emulators/osf1_lib/MESSAGE
new file mode 100644
index 00000000000..ecf064eb5ee
--- /dev/null
+++ b/emulators/osf1_lib/MESSAGE
@@ -0,0 +1,6 @@
+==============================================================================
+$NetBSD: MESSAGE,v 1.1 2006/06/19 23:22:29 jlam Exp $
+
+Do not forget to include COMPAT_OSF1 in your kernel configuration file.
+OSF/1 binaries require this option in order to work.
+==============================================================================
diff --git a/emulators/osf1_lib/Makefile b/emulators/osf1_lib/Makefile
index 79a9c7c6c67..18f8cfeba36 100644
--- a/emulators/osf1_lib/Makefile
+++ b/emulators/osf1_lib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2006/05/22 22:22:03 jlam Exp $
+# $NetBSD: Makefile,v 1.13 2006/06/19 23:22:29 jlam Exp $
DISTNAME= netscape-4.7-3.alpha
PKGNAME= osf1_lib-1.1
@@ -29,8 +29,6 @@ EMULDIR= ${PREFIX}/${EMULSUBDIR}
EXTRACT_ONLY= # empty
NO_CONFIGURE= yes
NO_BUILD= yes
-INSTALL_SRC= ${PKGDIR}/INSTALL
-DEINSTALL_SRC= # empty
RPMARGS= -i usr/lib -i usr/bin ${DISTDIR}/${DISTFILES}
@@ -46,7 +44,4 @@ do-install:
(cd ${EMULDIR}; ${MKDIR} usr/lib/X11)
(cd ${EMULDIR}/usr/lib/X11; ${LN} -fs ${X11BASE}/lib/X11/locale .)
-post-install:
- PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
-
.include "../../mk/bsd.pkg.mk"