summaryrefslogtreecommitdiff
path: root/emulators/suse100_vmware
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-07-29 05:18:36 +0000
committerjlam <jlam@pkgsrc.org>2007-07-29 05:18:36 +0000
commit33f30156fb37245b360bbc293320402ecf1aba41 (patch)
tree45cad36d8470a568b9136017b2dd79c9efcc65bc /emulators/suse100_vmware
parentffe106498e5f63e2e945d5b6b2ac8807a10ae78f (diff)
downloadpkgsrc-33f30156fb37245b360bbc293320402ecf1aba41.tar.gz
* Add new emulator framework in pkgsrc/mk/emulator that handles all
binary-only packages that require binary "emulation" on the native operating system. Please see pkgsrc/mk/emulator/README for more details. * Teach the plist framework to automatically use any existing PLIST.${EMUL_PLATFORM} as part of the default PLIST_SRC definition. * Convert all of the binary-only packages in pkgsrc to use the emulator framework. Most of them have been tested to install and deinstall correctly. This involves the following cleanup actions: * Remove use of custom PLIST code and use PLIST.${EMUL_PLATFORM} more consistently. * Simplify packages by using default INSTALL and DEINSTALL scripts instead of custom INSTALL/DEINSTALL code. * Remove "SUSE_COMPAT32" and "PKG_OPTIONS.suse" from pkgsrc. Packages only need to state exactly which emulations they support, and the framework handles any i386-on-x86_64 or sparc-on-sparc64 uses. * Remove "USE_NATIVE_LINUX" from pkgsrc. The framework will automatically detect when the package is installing on Linux. Specific changes to packages include: * Bump the PKGREVISIONs for all of the suse100* and suse91* packages due to changes in the +INSTALL/+DEINSTALL scripts used in all of the packages. * Remove pkgsrc/emulators/suse_linux, which is unused by any packages. * cad/lc -- remove custom code to create the distinfo file for all supported platforms; just use "emul-fetch" and "emul-distinfo" instead. * lang/Cg-compiler -- install the shared libraries under ${EMULDIR} instead of ${PREFIX}/lib so that compiled programs will find the shared libraries. * mail/thunderbird-bin-nightly -- update to latest binary distributions for supported platforms. * multimedia/ns-flash -- update Linux version to 9.0.48 as the older version is no longer available for interactive fetch. * security/uvscan -- set LD_LIBRARY_PATH explicitly so that it's not necessary to install library symlinks into ${EMULDIR}/usr/local/lib. * www/firefox-bin-flash -- update Linux version to 9.0.48 as the older version is no longer available for interactive fetch.
Diffstat (limited to 'emulators/suse100_vmware')
-rw-r--r--emulators/suse100_vmware/DEINSTALL9
-rw-r--r--emulators/suse100_vmware/DESCR7
-rw-r--r--emulators/suse100_vmware/INSTALL156
-rw-r--r--emulators/suse100_vmware/Makefile32
-rw-r--r--emulators/suse100_vmware/PLIST2
-rw-r--r--emulators/suse100_vmware/distinfo8
-rw-r--r--emulators/suse100_vmware/files/device-links21
7 files changed, 182 insertions, 53 deletions
diff --git a/emulators/suse100_vmware/DEINSTALL b/emulators/suse100_vmware/DEINSTALL
new file mode 100644
index 00000000000..eaf7327d1f8
--- /dev/null
+++ b/emulators/suse100_vmware/DEINSTALL
@@ -0,0 +1,9 @@
+# $NetBSD: DEINSTALL,v 1.1 2007/07/29 05:19:00 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/suse100_vmware/DESCR b/emulators/suse100_vmware/DESCR
index 9777e703fdd..efff03682f1 100644
--- a/emulators/suse100_vmware/DESCR
+++ b/emulators/suse100_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/suse100_vmware/INSTALL b/emulators/suse100_vmware/INSTALL
new file mode 100644
index 00000000000..c1d5d28d67c
--- /dev/null
+++ b/emulators/suse100_vmware/INSTALL
@@ -0,0 +1,156 @@
+# $NetBSD: INSTALL,v 1.1 2007/07/29 05:19:00 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/suse100_vmware/Makefile b/emulators/suse100_vmware/Makefile
index bc8b623fd91..31e7ed9870a 100644
--- a/emulators/suse100_vmware/Makefile
+++ b/emulators/suse100_vmware/Makefile
@@ -1,35 +1,15 @@
-# $NetBSD: Makefile,v 1.1.1.1 2007/03/21 16:10:13 tron Exp $
+# $NetBSD: Makefile,v 1.2 2007/07/29 05:19:00 jlam Exp $
DISTNAME= suse_vmware-${SUSE_VERSION}
+PKGREVISION= 1
CATEGORIES= emulators
-MASTER_SITES= ${MASTER_SITE_SUSE100}
-DISTFILES= ${RPMFILES}
+DISTFILES= grep-2.5.1a-5.${SUSE_ARCH}.rpm
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.suse.com/
-COMMENT= Linux compatibility package to support running VMware
+COMMENT= Linux compatibility package to help run VMware
-DEPENDS+= suse_base-${SUSE_VERSION}{,nb*}:../../emulators/suse100_base
-DEPENDS+= suse_x11-${SUSE_VERSION}{,nb*}:../../emulators/suse100_x11
-
-EXTRACT_ONLY= # empty
-NO_BUILD= YES
-PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
-PLIST_SUBST+= EMULSUBDIR=${EMULSUBDIR:Q}
-
-RPMFILES= grep-2.5.1a-5.i586.rpm
-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}
+EMUL_MODULES.linux= base x11
+RPMIGNOREPATH= usr
.include "../../emulators/suse100_linux/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/suse100_vmware/PLIST b/emulators/suse100_vmware/PLIST
deleted file mode 100644
index c2dda48050e..00000000000
--- a/emulators/suse100_vmware/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2007/03/21 16:10:13 tron Exp $
-@comment this plist intentionally left empty
diff --git a/emulators/suse100_vmware/distinfo b/emulators/suse100_vmware/distinfo
index 8c544fcff27..41dd56c3353 100644
--- a/emulators/suse100_vmware/distinfo
+++ b/emulators/suse100_vmware/distinfo
@@ -1,5 +1,11 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/03/21 16:10:13 tron Exp $
+$NetBSD: distinfo,v 1.2 2007/07/29 05:19:01 jlam Exp $
SHA1 (suse100/i586/grep-2.5.1a-5.i586.rpm) = 728aab187b21e2e3ca8157a04e6bfec289c0fe43
RMD160 (suse100/i586/grep-2.5.1a-5.i586.rpm) = 884f721b66cf236d7baccf83711495ed67529e52
Size (suse100/i586/grep-2.5.1a-5.i586.rpm) = 179908 bytes
+SHA1 (suse100/ppc/grep-2.5.1a-5.ppc.rpm) = 8a73f4feb5c263c33899d4466545f083d888b6fd
+RMD160 (suse100/ppc/grep-2.5.1a-5.ppc.rpm) = a9da42c0b55eb8984a51c6b64f213ddb1e207537
+Size (suse100/ppc/grep-2.5.1a-5.ppc.rpm) = 187765 bytes
+SHA1 (suse100/x86_64/grep-2.5.1a-5.x86_64.rpm) = 0727852e8e75fb8af48dc463882efe810e76378a
+RMD160 (suse100/x86_64/grep-2.5.1a-5.x86_64.rpm) = cfde4f3da0f7a1fb463f46ef5dbaa9ef0b2a949a
+Size (suse100/x86_64/grep-2.5.1a-5.x86_64.rpm) = 182763 bytes
diff --git a/emulators/suse100_vmware/files/device-links b/emulators/suse100_vmware/files/device-links
deleted file mode 100644
index fb13c5500f6..00000000000
--- a/emulators/suse100_vmware/files/device-links
+++ /dev/null
@@ -1,21 +0,0 @@
-# $NetBSD: device-links,v 1.1.1.1 2007/03/21 16:10:13 tron 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