diff options
Diffstat (limited to 'emulators/suse91_vmware')
-rw-r--r-- | emulators/suse91_vmware/DEINSTALL | 9 | ||||
-rw-r--r-- | emulators/suse91_vmware/DESCR | 7 | ||||
-rw-r--r-- | emulators/suse91_vmware/INSTALL | 156 | ||||
-rw-r--r-- | emulators/suse91_vmware/Makefile | 38 | ||||
-rw-r--r-- | emulators/suse91_vmware/PLIST | 2 | ||||
-rw-r--r-- | emulators/suse91_vmware/files/device-links | 21 |
6 files changed, 178 insertions, 55 deletions
diff --git a/emulators/suse91_vmware/DEINSTALL b/emulators/suse91_vmware/DEINSTALL new file mode 100644 index 00000000000..4b8b4b81dec --- /dev/null +++ b/emulators/suse91_vmware/DEINSTALL @@ -0,0 +1,9 @@ +# $NetBSD: DEINSTALL,v 1.1 2007/07/29 05:19:22 jlam Exp $ + +case "${STAGE}" in +DEINSTALL) + # Run any actions that require root privileges. + ${TEST} ! -x ./+ROOT_ACTIONS || + ./+ROOT_ACTIONS REMOVE ${PKG_METADATA_DIR} || exit 1 + ;; +esac diff --git a/emulators/suse91_vmware/DESCR b/emulators/suse91_vmware/DESCR index 9777e703fdd..efff03682f1 100644 --- a/emulators/suse91_vmware/DESCR +++ b/emulators/suse91_vmware/DESCR @@ -1,4 +1,5 @@ -Linux compatibility package based on the SuSE Linux distribution, take a -look at "http://www.suse.com/" for more information about it. +Linux compatibility package based on the SuSE Linux distribution. +Please visit http://www.suse.com/ for more information about SuSE +Linux. -This package is supposed to help running VMware under NetBSD. +This package is a helper package for running VMware. diff --git a/emulators/suse91_vmware/INSTALL b/emulators/suse91_vmware/INSTALL new file mode 100644 index 00000000000..2ecaa0a2007 --- /dev/null +++ b/emulators/suse91_vmware/INSTALL @@ -0,0 +1,156 @@ +# $NetBSD: INSTALL,v 1.1 2007/07/29 05:19:22 jlam Exp $ + +# Generate a +ROOT_ACTIONS script that runs certain actions that require +# superuser privileges. +# +case "${STAGE},$1" in +UNPACK,|UNPACK,+ROOT_ACTIONS) + ${CAT} > ./+ROOT_ACTIONS << 'EOF' +#!@SH@ +# +# +ROOT_ACTIONS - run actions requiring superuser privileges +# +# Usage: ./+ROOT_ACTIONS ADD|REMOVE [metadatadir] +# +# This script runs certain actions that require superuser privileges. +# If such privileges are not available, then simply output a message +# asking the user to run this script with the appropriate elevated +# privileges. +# +# Lines starting with "# SYMLINK: " are data read by this script that +# name the source paths and corresponding symlink that is managed by +# this script. If the symlink path is relative, then it is taken to be +# relative to ${PKG_PREFIX}. The source path is always unchanged. +# +# # SYMLINK: /dev/rcd0a ${EMULSUBDIR}/dev/cdrom +# + +CAT="@CAT@" +CHMOD="@CHMOD@" +ECHO="@ECHO@" +ID="@ID@" +LN="@LN@" +PWD_CMD="@PWD_CMD@" +RM="@RM@" +SED="@SED@" +TEST="@TEST@" + +SELF=$0 +ACTION=$1 + +CURDIR=`${PWD_CMD}` +PKG_METADATA_DIR="${2-${CURDIR}}" +: ${PKGNAME=${PKG_METADATA_DIR##*/}} +: ${PKG_PREFIX=@PREFIX@} + +ROOT_ACTIONS_COOKIE="${PKG_METADATA_DIR}/+ROOT_ACTIONS_done" +EUID=`${ID} -u` + +exitcode=0 +case $ACTION,$EUID in +ADD,0) + ${ECHO} "" > ${ROOT_ACTIONS_COOKIE} + ${CHMOD} g+w ${ROOT_ACTIONS_COOKIE} + ${SED} -n "/^\# SYMLINK: /{s/^\# SYMLINK: //;p;}" ${SELF} | + while read src dst; do + case $src in + "") continue ;; + esac + case $dst in + "") continue ;; + [!/]*) dst="${PKG_PREFIX}/$dst" ;; + esac + + if ${TEST} ! -e "$dst"; then + ${ECHO} "${PKGNAME}: linking $dst -> $src" + ${LN} -fs "$src" "$dst" + fi + done + ;; + +REMOVE,0) + ${SED} -n "/^\# SYMLINK: /{s/^\# SYMLINK: //;p;}" ${SELF} | + while read src dst; do + case $src in + "") continue ;; + esac + case $dst in + "") continue ;; + [!/]*) dst="${PKG_PREFIX}/$dst" ;; + esac + + if ${TEST} -e "$dst"; then + ${ECHO} "${PKGNAME}: removing $dst" + ${RM} -f "$dst" + fi + done + ${RM} -f ${ROOT_ACTIONS_COOKIE} + ;; + +ADD,*) + if ${TEST} ! -f ${ROOT_ACTIONS_COOKIE}; then + ${CAT} << EOM +============================================================================== +Please run the following command with superuser privileges to complete +the installation of ${PKGNAME}: + + cd ${PKG_METADATA_DIR} && ${SELF} ADD + +============================================================================== +EOM + fi + ;; + +REMOVE,*) + if ${TEST} -f ${ROOT_ACTIONS_COOKIE}; then + ${CAT} << EOM +============================================================================== +Please run the following command with superuser privileges to begin the +removal of ${PKGNAME}: + + cd ${PKG_METADATA_DIR} && ${SELF} REMOVE + +Then, please run pkg_delete(1) again to complete the removal of this +package. + +============================================================================== +EOM + exitcode=1 + fi + ;; +esac +exit $exitcode + +EOF + ${SED} -n "/^\# SYMLINK: /p" ${SELF} >> ./+ROOT_ACTIONS + ${CHMOD} +x ./+ROOT_ACTIONS + ;; +esac + +# SYMLINK: /dev/rcd0a @EMULSUBDIR@/dev/cdrom +# SYMLINK: /dev/rfd0a @EMULSUBDIR@/dev/fd0 +# SYMLINK: /dev/wd0d @EMULSUBDIR@/dev/hda +# SYMLINK: /dev/wd1d @EMULSUBDIR@/dev/hdb +# SYMLINK: /dev/wd2d @EMULSUBDIR@/dev/hdc +# SYMLINK: /dev/wd3d @EMULSUBDIR@/dev/hdd +# SYMLINK: /dev/sd0d @EMULSUBDIR@/dev/hde +# SYMLINK: /dev/sd1d @EMULSUBDIR@/dev/hdf +# SYMLINK: /dev/sd2d @EMULSUBDIR@/dev/hdg +# SYMLINK: /dev/sd3d @EMULSUBDIR@/dev/hdh +# SYMLINK: /dev/sd4d @EMULSUBDIR@/dev/hdi +# SYMLINK: /dev/ttyE0 @EMULSUBDIR@/dev/tty1 +# SYMLINK: /dev/ttyE1 @EMULSUBDIR@/dev/tty2 +# SYMLINK: /dev/ttyE2 @EMULSUBDIR@/dev/tty3 +# SYMLINK: /dev/ttyE3 @EMULSUBDIR@/dev/tty4 +# SYMLINK: /dev/ttyE4 @EMULSUBDIR@/dev/tty5 +# SYMLINK: /dev/ttyE5 @EMULSUBDIR@/dev/tty6 +# SYMLINK: /dev/ttyE6 @EMULSUBDIR@/dev/tty7 +# SYMLINK: /dev/ttyE7 @EMULSUBDIR@/dev/tty8 +# SYMLINK: tty1 @EMULSUBDIR@/dev/tty0 + +case "${STAGE}" in +POST-INSTALL) + ${TEST} ! -x ./+ROOT_ACTIONS || + ./+ROOT_ACTIONS ADD ${PKG_METADATA_DIR} + ;; +esac diff --git a/emulators/suse91_vmware/Makefile b/emulators/suse91_vmware/Makefile index 3eec3dcfcf9..f19e5fdff55 100644 --- a/emulators/suse91_vmware/Makefile +++ b/emulators/suse91_vmware/Makefile @@ -1,36 +1,16 @@ -# $NetBSD: Makefile,v 1.8 2007/02/22 19:26:28 wiz Exp $ +# $NetBSD: Makefile,v 1.9 2007/07/29 05:19:22 jlam Exp $ -DISTNAME= suse_vmware-${SUSE_VERSION} -PKGREVISION= 2 -CATEGORIES= emulators -MASTER_SITES= ${MASTER_SITE_SUSE91} -DISTFILES= ${RPMFILES} +DISTNAME= suse_vmware-${SUSE_VERSION} +PKGREVISION= 3 +CATEGORIES= emulators +DISTFILES= grep-2.5.1-416.${SUSE_ARCH}.rpm -MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://www.suse.com/ -COMMENT= Linux compatibility package to support running VMware +MAINTAINER= pkgsrc-users@NetBSD.org +COMMENT= Linux compatibility package to help run VMware -DEPENDS+= suse_base-${SUSE_VERSION}{,nb*}:../../emulators/suse91_base -DEPENDS+= suse_x11-${SUSE_VERSION}{,nb*}:../../emulators/suse91_x11 - -EXTRACT_ONLY= # empty -NO_BUILD= YES -PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC -PLIST_SUBST+= EMULSUBDIR=${EMULSUBDIR:Q} - -RPMFILES= grep-2.5.1-416.i586.rpm +EMUL_PLATFORMS= linux-i386 +EMUL_MODULES.linux= base x11 RPMIGNOREPATH= usr -post-install: - @${GREP} -v '^#' ${FILESDIR}/device-links | \ - ${AWK} '{print("${LN} -fs "$$1" ${EMULDIR}/dev/"$$2)}' | \ - ${SH} - - @${GREP} -v '^#' ${FILESDIR}/device-links | \ - ${AWK} '{print("@exec ${LN} -fs "$$1" %D/${EMULSUBDIR}/dev/"$$2)}' \ - >>${PLIST_SRC} - @${GREP} -v '^#' ${FILESDIR}/device-links | \ - ${AWK} '{print("@unexec ${RM} -f %D/${EMULSUBDIR}/dev/"$$2)}' \ - >>${PLIST_SRC} - .include "../../emulators/suse91_linux/Makefile.common" .include "../../mk/bsd.pkg.mk" diff --git a/emulators/suse91_vmware/PLIST b/emulators/suse91_vmware/PLIST deleted file mode 100644 index c5d7a7e8c18..00000000000 --- a/emulators/suse91_vmware/PLIST +++ /dev/null @@ -1,2 +0,0 @@ -@comment $NetBSD: PLIST,v 1.2 2005/04/02 17:10:19 jdolecek Exp $ -@comment this plist intentionally left empty diff --git a/emulators/suse91_vmware/files/device-links b/emulators/suse91_vmware/files/device-links deleted file mode 100644 index 50b0788efdc..00000000000 --- a/emulators/suse91_vmware/files/device-links +++ /dev/null @@ -1,21 +0,0 @@ -# $NetBSD: device-links,v 1.1.1.1 2005/04/02 16:59:44 jdolecek Exp $ -/dev/rcd0a cdrom -/dev/rfd0a fd0 -/dev/wd0d hda -/dev/wd1d hdb -/dev/wd2d hdc -/dev/wd3d hdd -/dev/sd0d hde -/dev/sd1d hdf -/dev/sd2d hdg -/dev/sd3d hdh -/dev/sd4d hdi -/dev/ttyE0 tty1 -/dev/ttyE1 tty2 -/dev/ttyE2 tty3 -/dev/ttyE3 tty4 -/dev/ttyE4 tty5 -/dev/ttyE5 tty6 -/dev/ttyE6 tty7 -/dev/ttyE7 tty8 -tty1 tty0 |