summaryrefslogtreecommitdiff
path: root/emulators/freebsd_lib
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/freebsd_lib
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/freebsd_lib')
-rw-r--r--emulators/freebsd_lib/INSTALL48
-rw-r--r--emulators/freebsd_lib/MESSAGE8
2 files changed, 30 insertions, 26 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.
+==============================================================================