summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortv <tv>2000-12-15 00:10:32 +0000
committertv <tv>2000-12-15 00:10:32 +0000
commit58aeeec992a7ec192b99c11dacc0f517503132b2 (patch)
tree306cf59b39908c0443ccea48e951a01495a66ab7
parentd54fe89c5da42254c1eff7573c6efb4b9dae1940 (diff)
downloadpkgsrc-58aeeec992a7ec192b99c11dacc0f517503132b2.tar.gz
Flesh out the installation infrastructure. Currently this is done in the
pkg's Makefile, but should someday be part of the plex86 distribution.
-rw-r--r--emulators/plex86/Makefile62
-rw-r--r--emulators/plex86/pkg/MESSAGE23
-rw-r--r--emulators/plex86/pkg/PLIST43
3 files changed, 109 insertions, 19 deletions
diff --git a/emulators/plex86/Makefile b/emulators/plex86/Makefile
index d75f0313a9b..c41452e7a6f 100644
--- a/emulators/plex86/Makefile
+++ b/emulators/plex86/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2000/12/14 19:45:49 tv Exp $
+# $NetBSD: Makefile,v 1.9 2000/12/15 00:10:32 tv Exp $
#
DISTNAME= plex86-20001214.2
@@ -15,8 +15,15 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--with-NetBSD \
--with-netbsd-source=${BSDSRCDIR}/sys
USE_GMAKE= yes
-NO_PKG_REGISTER= yes # ONLY until we really install files!!!
-NO_PACKAGE= Incomplete # ONLY until we really install files!!!
+USE_X11BASE= yes # for VGA font
+
+ONLY_FOR_PLATFORM= NetBSD-*-i386
+
+RESTRICTED= CPU-specific binary code
+NO_BIN_ON_CDROM=${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+
+MESSAGE_FILE= ${WRKSRC}/.MESSAGE
BSDSRCDIR?= /nonexistent # to override <bsd.own.mk>, MUST be
# set this way BEFORE bsd.prefs.mk
@@ -33,9 +40,50 @@ pre-extract:
@${FALSE}
.endif
-do-install:
- @${CAT} ${MESSAGE_FILE}
- @${ECHO_MSG} Package NOT recorded as installed!
- @# Remove the NO_PKG_REGISTER/NO_PACKAGE above if this does something!!!
+pre-build:
+ cd ${WRKSRC} && ${GTAR} xzf docs/output.tar.gz
+
+post-build:
+ ${GZIP_CMD} -9 ${WRKSRC}/misc/vga.pcf
+
+do-install: do-install-dirs do-install-binaries do-install-bios \
+ do-install-font do-install-conf do-install-docs
+ ${SED} -e 's,@PREFIX@,${PREFIX},g' <${PKGDIR}/MESSAGE >${MESSAGE_FILE}
+
+do-install-dirs:
+ ${INSTALL_DATA_DIR} ${PREFIX}/lkm \
+ ${PREFIX}/lib/plex86 \
+ ${PREFIX}/lib/plex86/bios \
+ ${PREFIX}/share/examples/plex86 \
+ ${PREFIX}/share/doc/html/plex86
+
+do-install-binaries:
+ ${INSTALL_PROGRAM} ${WRKSRC}/user/plex86 ${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/user/resetmod ${PREFIX}/bin/plex86_reset
+ ${INSTALL_DATA} ${WRKSRC}/user/plugins/bochs/plugin-bochs.so ${PREFIX}/lib/plex86/
+ ${INSTALL_DATA} ${WRKSRC}/kernel/plex86.o ${PREFIX}/lkm/
+ ${INSTALL_SCRIPT} ${WRKSRC}/misc/netbsd_post.sh ${PREFIX}/lib/plex86/
+
+do-install-bios:
+ ${INSTALL_DATA} ${WRKSRC}/bios/BIOS-plex86-2000_0817a \
+ ${WRKSRC}/bios/VGABIOS-elpin-2.40 \
+ ${PREFIX}/lib/plex86/bios/
+
+do-install-font:
+ ${INSTALL_DATA} ${WRKSRC}/misc/vga.pcf.gz ${PREFIX}/lib/X11/fonts/local/
+ ${X11BASE}/bin/mkfontdir ${PREFIX}/lib/X11/fonts/local
+
+do-install-conf:
+ @cd ${WRKSRC}/conf && for f in freedos linuxhd msdos qnx win95 winnt; do \
+ ${SED} -e 's,\.\./\.\./,/PATH/TO/,' \
+ -e 's,\.\./bios/,${PREFIX}/share/plex86/,' \
+ -e 's,\./plugins/bochs/,${PREFIX}/lib/plex86/,' \
+ $$f >${WRKDIR}/$$f.conf; \
+ done
+ ${INSTALL_DATA} ${WRKDIR}/*.conf ${PREFIX}/share/examples/plex86/
+
+do-install-docs:
+ @${INSTALL_DATA} ${WRKSRC}/output/html/* ${WRKSRC}/docs/html/*.* \
+ ${PREFIX}/share/doc/html/plex86/
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/plex86/pkg/MESSAGE b/emulators/plex86/pkg/MESSAGE
index 1ab97db571f..ad74889a1fe 100644
--- a/emulators/plex86/pkg/MESSAGE
+++ b/emulators/plex86/pkg/MESSAGE
@@ -1,16 +1,17 @@
===========================================================================
-plex86 has been compiled, but must be run in-place for now. To do so, do:
+NOTE: Because plex86 contains a kernel module, it must be run with a
+kernel built from the same sources as the plex86 binaries. If you are
+running a system with changing kernel sources (such as NetBSD-current),
+you must recompile and reinstall plex86 after compiling your kernel from
+updated sources. (Be sure to disable the LKM while doing this!)
- * su
- * cd work*/plex86/.
- * cd misc
- * modload -e plex86_lkmentry -p netbsd_post.sh ../kernel/plex86.o
- * mkfontdir `pwd`
- * xset fp+ `pwd`
- * cd ../conf
- * Set up a config file (manuall edit necessary!)
- * cd ../user
- * ./plex86 -f ../conf/yourconfigfile
+In order to enable loading of the plex86 kernel module at boot time,
+edit /etc/lkm.conf and add the following line:
+
+@PREFIX@/lkm/plex86.o - - @PREFIX@/lib/plex86/netbsd_post.sh - AFTERMOUNT
+
+The module will be loaded after reboot, and the netbsd_post.sh script will
+automatically create the needed /dev/plex86 device.
===========================================================================
diff --git a/emulators/plex86/pkg/PLIST b/emulators/plex86/pkg/PLIST
index 87c3bd5469a..5e7b9b8e746 100644
--- a/emulators/plex86/pkg/PLIST
+++ b/emulators/plex86/pkg/PLIST
@@ -1 +1,42 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/14 04:25:52 hubertf Exp $
+@comment $NetBSD: PLIST,v 1.2 2000/12/15 00:10:33 tv Exp $
+bin/plex86
+bin/plex86_reset
+lib/X11/fonts/local/vga.pcf.gz
+lib/plex86/bios/BIOS-plex86-2000_0817a
+lib/plex86/bios/VGABIOS-elpin-2.40
+lib/plex86/netbsd_post.sh
+lib/plex86/plugin-bochs.so
+lkm/plex86.o
+@unexec rm -f %D/lkm/plex86 2>/dev/null || true
+share/doc/html/plex86/address_space.html
+share/doc/html/plex86/book1.htm
+share/doc/html/plex86/c10.htm
+share/doc/html/plex86/c13.htm
+share/doc/html/plex86/c18.htm
+share/doc/html/plex86/c21.htm
+share/doc/html/plex86/c24.htm
+share/doc/html/plex86/c31.htm
+share/doc/html/plex86/c34.htm
+share/doc/html/plex86/c74.htm
+share/doc/html/plex86/c77.htm
+share/doc/html/plex86/c80.htm
+share/doc/html/plex86/c86.htm
+share/doc/html/plex86/c89.htm
+share/doc/html/plex86/c92.htm
+share/doc/html/plex86/c95.htm
+share/doc/html/plex86/c96.htm
+share/doc/html/plex86/c98.htm
+share/doc/html/plex86/c99.htm
+share/doc/html/plex86/nopaging.gif
+share/doc/html/plex86/x68.htm
+share/examples/plex86/freedos.conf
+share/examples/plex86/linuxhd.conf
+share/examples/plex86/msdos.conf
+share/examples/plex86/qnx.conf
+share/examples/plex86/win95.conf
+share/examples/plex86/winnt.conf
+@dirrm lib/plex86/bios
+@dirrm lib/plex86
+@dirrm share/doc/html/plex86
+@dirrm share/examples/plex86
+@unexec rmdir %D/lkm 2>/dev/null || true