summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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