summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>1999-05-22 19:31:07 +0000
committertv <tv@pkgsrc.org>1999-05-22 19:31:07 +0000
commitf62bec75b30eab073376e20f3f5a4e043b1c1497 (patch)
treeadb66a3a9bfe7a9cd21e93ab28d58795ec74474e /emulators
parent50265bfb0c9ac46c65a4a51f011867937cc159a0 (diff)
downloadpkgsrc-f62bec75b30eab073376e20f3f5a4e043b1c1497.tar.gz
Clean this up a bit:
- actually extract to ${WRKDIR} and use find, xargs, and ${INSTALL_DATA{,_DIR}} to get the permissions right - add a "smart-/emul" script that will automatically add a symlink from /emul/freebsd (adding /emul directory as necessary) only in the cases where this will not clobber something; otherwise print a message at install time that the user must do this. Note that this still works if /emul is a symlink to ${LOCALBASE}/emul, though that is no longer required. - issue a message at install time reminding the user to add COMPAT_FREEBSD to the kernel configuration.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/freebsd_lib/Makefile26
-rw-r--r--emulators/freebsd_lib/pkg/INSTALL34
2 files changed, 43 insertions, 17 deletions
diff --git a/emulators/freebsd_lib/Makefile b/emulators/freebsd_lib/Makefile
index a081e908a49..6a927309ac0 100644
--- a/emulators/freebsd_lib/Makefile
+++ b/emulators/freebsd_lib/Makefile
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.3 1998/12/12 18:10:31 frueauf Exp $
+# $NetBSD: Makefile,v 1.4 1999/05/22 19:31:07 tv Exp $
#
DISTNAME= freebsd_lib-2.2.7
CATEGORIES= emulators
MASTER_SITES= http://www.flame.org/NetBSD/
ONLY_FOR_ARCHS= i386
+ONLY_FOR_OPSYS= NetBSD
MAINTAINER= packages@netbsd.org
@@ -19,24 +20,15 @@ MAINTAINER= packages@netbsd.org
MIRROR_DISTFILE= no
NO_BUILD= yes
-EXTRACT_ONLY= # empty
NO_WRKSUBDIR= yes
-EMUL_DIR= ${PREFIX}/emul
-FREEBSD_DIR= ${EMUL_DIR}/freebsd
-
-pre-install:
- @[ -d ${EMUL_DIR} ] || ${MKDIR} ${EMUL_DIR}
- @if [ ! -e /emul ] || \
- [ "`ls -i /emul/.`" != "`ls -i ${EMUL_DIR}`" ]; \
- then \
- ${ECHO} -n "You must create a link \"/emul\" "; \
- ${ECHO} "pointing to \"${EMUL_DIR}\"."; \
- exit 1; \
- fi
-
do-install:
- ${MKDIR} ${FREEBSD_DIR}
- (cd ${FREEBSD_DIR}; pax -rzf ${DISTDIR}/${DISTNAME}.tar.gz)
+ @${INSTALL_DATA_DIR} ${PREFIX}/emul/freebsd
+ @(cd ${WRKSRC} && find usr -type d -print) | \
+ (cd ${PREFIX}/emul/freebsd && xargs ${INSTALL_DATA_DIR})
+ @cd ${WRKSRC} && for file in `find usr -name '*.*' -print`; do \
+ ${INSTALL_DATA} $$file ${PREFIX}/emul/freebsd/$$file; \
+ done
+ @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} - POST-INSTALL
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/freebsd_lib/pkg/INSTALL b/emulators/freebsd_lib/pkg/INSTALL
new file mode 100644
index 00000000000..40af90b9a13
--- /dev/null
+++ b/emulators/freebsd_lib/pkg/INSTALL
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $NetBSD: INSTALL,v 1.1 1999/05/22 19:31:07 tv Exp $
+
+emul=freebsd
+if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
+
+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
+
+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
+
+cat <<EOF
+
+==============================================================================
+EOF