summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2006-05-10 16:11:09 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2006-05-10 16:11:09 +0000
commit2d649e4f7c259862d003a4823db71ae4d32b0344 (patch)
tree6bc742b4c1153653a5f883cfa1628096f619f1a1 /app-emulation/vmware-workstation-tools
parentInitial import of ebuild written by me. (diff)
downloadgentoo-2-2d649e4f7c259862d003a4823db71ae4d32b0344.tar.gz
gentoo-2-2d649e4f7c259862d003a4823db71ae4d32b0344.tar.bz2
gentoo-2-2d649e4f7c259862d003a4823db71ae4d32b0344.zip
Updated the ebuilds some more to make them use cdrom_get_cds and pull from the CD itself. This should help as it doesn't require any download or moving/copying anything to DISTDIR. Again, this still is not 100% tested. It seems to merge fine, but since I am not testing this in a virtual machine (yet), it is still masked.
(Portage version: 2.1_pre10-r4)
Diffstat (limited to 'app-emulation/vmware-workstation-tools')
-rw-r--r--app-emulation/vmware-workstation-tools/ChangeLog19
-rw-r--r--app-emulation/vmware-workstation-tools/files/90vmware-tools3
-rw-r--r--app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-4.5.31
-rw-r--r--app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-5.0.02
-rwxr-xr-xapp-emulation/vmware-workstation-tools/files/vmware-workstation-tools90
-rw-r--r--app-emulation/vmware-workstation-tools/files/vmware-workstation-tools.rc72
-rw-r--r--app-emulation/vmware-workstation-tools/files/xorg.conf111
-rw-r--r--app-emulation/vmware-workstation-tools/vmware-workstation-tools-4.5.3.ebuild145
-rw-r--r--app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild126
9 files changed, 518 insertions, 51 deletions
diff --git a/app-emulation/vmware-workstation-tools/ChangeLog b/app-emulation/vmware-workstation-tools/ChangeLog
index f601c30236ed..6dea79199bcb 100644
--- a/app-emulation/vmware-workstation-tools/ChangeLog
+++ b/app-emulation/vmware-workstation-tools/ChangeLog
@@ -1,6 +1,23 @@
# ChangeLog for app-emulation/vmware-linux-tools
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/ChangeLog,v 1.4 2006/05/08 13:56:33 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/ChangeLog,v 1.5 2006/05/10 16:11:09 wolf31o2 Exp $
+
+*vmware-workstation-tools-4.5.3 (10 May 2006)
+
+ 10 May 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ -files/4.5.2/locations, -files/4.5.2/vmware-workstation-tools,
+ -files/4.5.2/xorg.conf, -files/5.0.0/locations,
+ -files/5.0.0/vmware-workstation-tools, -files/5.0.0/xorg.conf,
+ +files/90vmware-tools, +files/vmware-workstation-tools,
+ +files/vmware-workstation-tools.rc, +files/xorg.conf,
+ -vmware-workstation-tools-4.5.2.ebuild,
+ +vmware-workstation-tools-4.5.3.ebuild,
+ vmware-workstation-tools-5.0.0.ebuild:
+ Updated the ebuilds some more to make them use cdrom_get_cds and pull from
+ the CD itself. This should help as it doesn't require any download or
+ moving/copying anything to DISTDIR. Again, this still is not 100% tested. It
+ seems to merge fine, but since I am not testing this in a virtual machine
+ (yet), it is still masked.
08 May 2006; Chris Gianelloni <wolf31o2@gentoo.org> files/4.5.2/locations,
files/5.0.0/locations, files/4.5.2/vmware-workstation-tools,
diff --git a/app-emulation/vmware-workstation-tools/files/90vmware-tools b/app-emulation/vmware-workstation-tools/files/90vmware-tools
new file mode 100644
index 000000000000..40def354b296
--- /dev/null
+++ b/app-emulation/vmware-workstation-tools/files/90vmware-tools
@@ -0,0 +1,3 @@
+PATH=/opt/vmware/tools/bin
+ROOTPATH=/opt/vmware/tools/bin
+MANPATH=/opt/vmware/tools/man
diff --git a/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-4.5.3 b/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-4.5.3
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-4.5.3
@@ -0,0 +1 @@
+
diff --git a/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-5.0.0 b/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-5.0.0
index 4655f2a3b18e..8b137891791f 100644
--- a/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-5.0.0
+++ b/app-emulation/vmware-workstation-tools/files/digest-vmware-workstation-tools-5.0.0
@@ -1 +1 @@
-MD5 c920e12c64bd6352a29cf2f1ddf79c99 VMwareTools-5.0.0-13124.tar.gz 11370290
+
diff --git a/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools b/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools
new file mode 100755
index 000000000000..0ca65b26b553
--- /dev/null
+++ b/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools
@@ -0,0 +1,90 @@
+#!/sbin/runscript
+#
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools,v 1.1 2006/05/10 16:11:09 wolf31o2 Exp $
+#
+# This script manages the services needed to run VMware software
+
+VMWARE_ETC_DIR=/etc/vmware-tools
+VMWARE_BIN_DIR=/usr/bin
+VMWARE_SBIN_DIR=/usr/sbin
+VMWARE_LIB_DIR=/usr/lib/vmware-tools
+
+VMWARE_GUESTD_PID=/var/run/vmware-guestd.pid
+VMWARE_GUESTD_BIN=${VMWARE_SBIN_DIR}/vmware-guestd
+VMWARE_CHECKVM_BIN=${VMWARE_SBIN_DIR}/vmware-checkvm
+
+VMWARE_CONFIG_TOOLS=${VMWARE_BIN_DIR}/vmware-config-tools.pl
+
+VMWARE_VMHGFS_MOD=vmhgfs
+
+VMWARE_NOT_CONFIGURED=${VMWARE_ETC_DIR}/not_configured
+
+# Is a given module loaded?
+isLoaded() {
+ local module="$1"
+
+ /sbin/lsmod | awk 'BEGIN {n = "no";} {if ($1 == "'"$module"'") n = "yes";} END {print n;}'
+}
+
+vmware_tools_load_module() {
+ if [ "`isLoaded "$1"`" = 'yes' ]; then
+ /sbin/rmmod "$1"
+ fi
+ /sbin/insmod -s -f "/lib/modules/`uname -r`/misc/$1.o" >/dev/null 2>&1 || /sbin/insmod -s -f "$1" >/dev/null 2>&1 || eend 1
+}
+
+vmware_tools_unload_module() {
+ if [ "`isLoaded "$1"`" = 'yes' ]; then
+ /sbin/rmmod "$1" >/dev/null 2>&1 || eend 1
+ fi
+}
+
+depend ()
+{
+ before checkfs
+}
+
+checkconfig ()
+{
+ if [ -f $VMWARE_NOT_CONFIGURED ]; then
+ eerror "Please run $VMWARE_CONFIG_TOOLS first"
+ eend 1
+ return 1
+ fi
+
+ if ! $VMWARE_CHECKVM_BIN > /dev/null 2>&1 ; then
+ eerror "Not running inside vmware"
+ eend 1
+ return 1
+ fi
+}
+
+start ()
+{
+ checkconfig || eend 1
+
+ ebegin "Loading vmware filesystem"
+ vmware_tools_load_module $VMWARE_VMHGFS_MOD
+ eend $?
+
+ ebegin "Starting vmware guestd"
+ start-stop-daemon -b --quiet -m --pidfile ${VMWARE_GUESTD_PID} --start --startas ${VMWARE_GUESTD_BIN}
+ eend $?
+
+}
+
+stop ()
+{
+ ebegin "Stopping vmware guestd"
+ start-stop-daemon --stop --pidfile ${VMWARE_GUESTD_PID} -x ${VMWARE_GUESTD_BIN}
+ eend $?
+
+ ebegin "Unloading vmware filesystem"
+ vmware_tools_unload_module $VMWARE_VMHGFS_MOD
+ eend $?
+}
+
+reload ()
+{
+ stop ; start
+}
diff --git a/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools.rc b/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools.rc
new file mode 100644
index 000000000000..f7d604b6a168
--- /dev/null
+++ b/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools.rc
@@ -0,0 +1,72 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/files/vmware-workstation-tools.rc,v 1.1 2006/05/10 16:11:09 wolf31o2 Exp $
+
+depend() {
+ before checkfs
+}
+
+vmware-prettify() {
+ # Yea, the code is ugly but the output is pretty
+ state=$1
+ waserror=0
+ msgtype=0
+ while read line
+ do
+ [ "$line" == "" ] && continue
+ if [ "$msgtype" -le "0" ]
+ then
+ if [ "$msgtype" == "-1" ]
+ then
+ ewarn $line
+ continue
+ fi
+ if [ "${line/*:*/}" == "" ]
+ then
+ einfon $line
+ echo
+ eend 0
+ msgtype=1
+ else
+ ewarn $line
+ msgtype=-1
+ waserror=1
+ fi
+ continue
+ fi
+
+ # Strip out anything after the <esc> code
+ message=`echo $line | sed -e "s/^\(.*\).*$/\1/"`
+ einfon " $message"
+ echo
+
+ echo $line | grep done > /dev/null
+ status=$?
+ eend $status
+
+ if [ "$status" != "0" ]
+ then
+ logger -p local0.err -t vmware-${state} "$line"
+ waserror=$status
+ fi
+ done
+ if [ "$msgtype" == "-1" ]
+ then
+ eend 1 "VMware is not properly configured! See above."
+ fi
+ return $waserror
+}
+
+start() {
+ test -x /etc/vmware-tools/init.d/vmware || \
+ eend 1 "vmware init script not found. Aborting" || return 1
+
+ /etc/vmware-tools/init.d/vmware start | vmware-prettify start
+ return $?
+}
+
+stop() {
+ /etc/vmware-tools/init.d/vmware stop | vmware-prettify stop
+ return $?
+}
diff --git a/app-emulation/vmware-workstation-tools/files/xorg.conf b/app-emulation/vmware-workstation-tools/files/xorg.conf
new file mode 100644
index 000000000000..9fcf4bae1848
--- /dev/null
+++ b/app-emulation/vmware-workstation-tools/files/xorg.conf
@@ -0,0 +1,111 @@
+Section "ServerLayout"
+ Identifier "X.org Configured"
+ Screen 0 "Screen0" 0 0
+ InputDevice "Mouse0" "CorePointer"
+ InputDevice "Keyboard0" "CoreKeyboard"
+EndSection
+
+Section "Files"
+ RgbPath "/usr/lib/X11/rgb"
+ ModulePath "/usr/lib/modules"
+ FontPath "/usr/share/fonts/misc/"
+ FontPath "/usr/share/fonts/TTF/"
+ FontPath "/usr/share/fonts/Type1/"
+ FontPath "/usr/share/fonts/CID/"
+ FontPath "/usr/share/fonts/75dpi/"
+ FontPath "/usr/share/fonts/100dpi/"
+EndSection
+
+Section "Module"
+ Load "extmod"
+ Load "dri"
+ Load "dbe"
+ Load "record"
+ Load "xtrap"
+ Load "glx"
+ Load "type1"
+ Load "freetype"
+EndSection
+
+Section "InputDevice"
+ Identifier "Keyboard0"
+ Driver "kbd"
+EndSection
+
+Section "InputDevice"
+ Identifier "Mouse0"
+ Driver "mouse"
+ Option "Protocol" "auto"
+ Option "Device" "/dev/mouse"
+EndSection
+
+Section "Monitor"
+ Identifier "Monitor0"
+ VendorName "Monitor Vendor"
+ ModelName "Monitor Model"
+
+ HorizSync 1-10000
+ VertRefresh 1-10000
+
+ ModeLine "640x480" 100 640 700 800 900 480 500 600 700
+ ModeLine "800x600" 100 800 900 1000 1100 600 700 800 900
+ ModeLine "1024x768" 100 1024 1100 1200 1300 768 800 900 1000
+ ModeLine "1152x864" 100 1152 1200 1300 1400 864 900 1000 1100
+ ModeLine "1152x900" 100 1152 1200 1300 1400 900 1000 1100 1200
+ ModeLine "1280x1024" 100 1280 1300 1400 1500 1024 1100 1200 1300
+ ModeLine "1376x1032" 100 1376 1400 1500 1600 1032 1100 1200 1300
+ ModeLine "1600x1200" 100 1600 1700 1800 1900 1200 1300 1400 1500
+ ModeLine "2364x1773" 100 2364 2400 2500 2600 1773 1800 1900 2000
+
+EndSection
+
+Section "Device"
+ ### Available Driver options are:-
+ ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
+ ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
+ ### [arg]: arg optional
+ #Option "HWcursor" # [<bool>]
+ #Option "NoAccel" # [<bool>]
+ Identifier "Card0"
+ Driver "vmware"
+ VendorName "VMWare Inc"
+ BoardName "Unknown Board"
+ BusID "PCI:0:15:0"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Card0"
+ Monitor "Monitor0"
+
+ SubSection "Display"
+ Viewport 0 0
+ Depth 4
+ Modes "1024x768"
+ EndSubSection
+
+ SubSection "Display"
+ Viewport 0 0
+ Depth 8
+ Modes "1024x768"
+ EndSubSection
+
+ SubSection "Display"
+ Viewport 0 0
+ Depth 15
+ Modes "1024x768"
+ EndSubSection
+
+ SubSection "Display"
+ Viewport 0 0
+ Depth 16
+ Modes "1024x768"
+ EndSubSection
+
+ SubSection "Display"
+ Viewport 0 0
+ Depth 24
+ Modes "1024x768"
+ EndSubSection
+EndSection
+
diff --git a/app-emulation/vmware-workstation-tools/vmware-workstation-tools-4.5.3.ebuild b/app-emulation/vmware-workstation-tools/vmware-workstation-tools-4.5.3.ebuild
new file mode 100644
index 000000000000..a5402d59f35b
--- /dev/null
+++ b/app-emulation/vmware-workstation-tools/vmware-workstation-tools-4.5.3.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/vmware-workstation-tools-4.5.3.ebuild,v 1.1 2006/05/10 16:11:09 wolf31o2 Exp $
+
+inherit eutils
+
+DESCRIPTION="Guest-os tools for VMware Workstation"
+HOMEPAGE="http://www.vmware.com/"
+
+# the vmware-tools sources are part of the vmware virtual machine;
+# they must be installed by hand
+SRC_URI=""
+LICENSE="vmware"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="X"
+RESTRICT=""
+
+DEPEND=""
+RDEPEND="sys-apps/pciutils"
+
+dir=/opt/vmware/tools
+Ddir=${D}/${dir}
+TARBALL="vmware-linux-tools.tar.gz"
+#VMwareTools-5.0.0-13124.tar.gz
+
+S=${WORKDIR}/vmware-tools-distrib
+
+vmware_create_initd() {
+ dodir /etc/vmware-tools/init.d
+ dodir /etc/vmware-tools/init.d/rc0.d
+ dodir /etc/vmware-tools/init.d/rc1.d
+ dodir /etc/vmware-tools/init.d/rc2.d
+ dodir /etc/vmware-tools/init.d/rc3.d
+ dodir /etc/vmware-tools/init.d/rc4.d
+ dodir /etc/vmware-tools/init.d/rc5.d
+ dodir /etc/vmware-tools/init.d/rc6.d
+
+ # This is to fix a problem where if someone merges vmware and then
+ # before configuring vmware they upgrade or re-merge the vmware
+ # package which would rmdir the /etc/vmware/init.d/rc?.d directories.
+ keepdir /etc/vmware/init.d/rc{0,1,2,3,4,5,6}.d
+}
+
+vmware_run_questions() {
+ # Questions:
+ einfo "Adding answers to /etc/vmware/locations"
+ locations="${D}/etc/vmware-tools/locations"
+ echo "answer BINDIR ${dir}/bin" >> ${locations}
+ echo "answer LIBDIR ${dir}/lib" >> ${locations}
+ echo "answer MANDIR ${dir}/man" >> ${locations}
+ echo "answer DOCDIR ${dir}/doc" >> ${locations}
+ echo "answer SBINDIR ${dir}/sbin" >> ${locations}
+ echo "answer RUN_CONFIGURATOR no" >> ${locations}
+ echo "answer INITDIR /etc/vmware/init.d" >> ${locations}
+ echo "answer INITSCRIPTSDIR /etc/vmware/init.d" >> ${locations}
+}
+
+pkg_setup() {
+ einfo "You will need ${TARBALL} from the VMware installation."
+ einfo "Select VM->Install VMware Tools from VMware Workstation's menu."
+ cdrom_get_cds ${TARBALL}
+}
+
+src_unpack() {
+ tar xf "${CDROM_ROOT}"/"${TARBALL}"
+}
+
+src_install() {
+ dodir ${dir}/bin
+ cp -pPR bin/* ${Ddir}/bin || die
+
+ dodir ${dir}/lib
+ cp -dr lib/* ${Ddir}/lib || die
+ # Since with Gentoo we compile everthing it doesn't make sense to keep
+ # the precompiled modules arround. Saves about 4 megs of disk space too.
+ rm -rf ${Ddir}/lib/modules/binary || die
+
+ into ${dir}
+ # install the binaries
+ dosbin sbin/vmware-checkvm || die
+ dosbin sbin/vmware-guestd || die
+
+ # install the config files
+ dodir /etc/vmware-tools
+ cp -pPR etc/* ${D}/etc/vmware-tools || die
+
+ # install the init scripts
+ newinitd ${FILESDIR}/${PN}.rc vmware-tools || die
+
+ # Environment
+ doenvd ${FILESDIR}/90vmware-tools || die
+
+ # if we have X, install the default config
+ if use X ; then
+ insinto /etc/X11
+ doins ${FILESDIR}/xorg.conf
+ fi
+
+ vmware_create_initd || die
+
+ cp -pPR installer/services.sh ${D}/etc/vmware-tools/init.d/vmware || die
+
+ vmware_run_questions || die
+}
+
+pkg_postinst () {
+ # This must be done after the install to get the mtimes on each file
+ # right. This perl snippet gets the /etc/vmware/locations file code:
+ # perl -e "@a = stat('bin/vmware'); print \$a[9]"
+ # The above perl line and the find line below output the same thing.
+ # I would think the find line is faster to execute.
+ # find /opt/vmware/workstation/bin/vmware -printf %T@
+
+ #Note: it's a bit weird to use ${D} in a preinst script but it should work
+ #(drobbins, 1 Feb 2002)
+
+ einfo "Generating /etc/vmware-tools/locations file."
+ d=`echo ${D} | wc -c`
+ for x in `find ${Ddir} ${D}/etc/vmware-tools` ; do
+ x="`echo ${x} | cut -c ${d}-`"
+ if [ -d ${D}/${x} ] ; then
+ echo "directory ${x}" >> ${D}/etc/vmware-tools/locations
+ else
+ echo -n "file ${x}" >> ${D}/etc/vmware-tools/locations
+ if [ "${x}" == "/etc/vmware-tools/locations" ] ; then
+ echo "" >> ${D}/etc/vmware-tools/locations
+ elif [ "${x}" == "/etc/vmware-tools/not_configured" ] ; then
+ echo "" >> ${D}/etc/vmware-tools/locations
+ else
+ echo -n " " >> ${D}/etc/vmware-tools/locations
+ #perl -e "@a = stat('${D}${x}'); print \$a[9]" >> ${D}/etc/vmware/locations
+ find ${D}${x} -printf %T@ >> ${D}/etc/vmware-tools/locations
+ echo "" >> ${D}/etc/vmware-tools/locations
+ fi
+ fi
+ done
+ einfo "To start using the vmware-tools, please run the following:"
+ einfo
+ einfo " /usr/bin/vmware-config-tools.pl"
+ einfo " rc-update add vmware-tools default"
+ einfo " /etc/init.d/vmware-tools start"
+ einfo
+ einfo "Please report all bugs to http://bugs.gentoo.org/"
+}
diff --git a/app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild b/app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild
index 2016b8643764..3931481bfd19 100644
--- a/app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild
+++ b/app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild,v 1.3 2006/05/08 13:56:33 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation-tools/vmware-workstation-tools-5.0.0.ebuild,v 1.4 2006/05/10 16:11:09 wolf31o2 Exp $
inherit eutils
@@ -9,60 +9,40 @@ HOMEPAGE="http://www.vmware.com/"
# the vmware-tools sources are part of the vmware virtual machine;
# they must be installed by hand
-SRC_URI="VMwareTools-5.0.0-13124.tar.gz"
+SRC_URI=""
LICENSE="vmware"
SLOT="0"
KEYWORDS="~x86"
IUSE="X"
-RESTRICT="fetch"
+RESTRICT=""
DEPEND=""
RDEPEND="sys-apps/pciutils"
dir=/opt/vmware/tools
Ddir=${D}/${dir}
+#TARBALL="vmware-linux-tools.tar.gz"
+TARBALL="VMwareTools-5.0.0-13124.tar.gz"
S=${WORKDIR}/vmware-tools-distrib
-src_install() {
- into ${dir}
- # install the binaries
- dosbin sbin/vmware-checkvm
- dosbin sbin/vmware-guestd
- dobin bin/vmware-config-tools.pl
- dobin bin/vmware-toolbox
-
- # install the config files
- insinto /etc/vmware-tools
- doins etc/{installer.sh,not_configured,{powero{ff,n},resume,suspend}-vm-default
-
- # install the library files
- mkdir -p ${D}/usr/lib/vmware-tools
- cp -r lib/* ${D}/usr/lib/vmware-tools
-
- # install the init scripts
- doinitd ${FILESDIR}/${PV}/${PN}
-
- # if we have X, install the default config
- if use X ; then
- insinto /etc/X11
- doins ${FILESDIR}/${PV}/xorg.conf
- fi
-
- dodir /etc/vmware/init.d
- dodir /etc/vmware/init.d/rc0.d
- dodir /etc/vmware/init.d/rc1.d
- dodir /etc/vmware/init.d/rc2.d
- dodir /etc/vmware/init.d/rc3.d
- dodir /etc/vmware/init.d/rc4.d
- dodir /etc/vmware/init.d/rc5.d
- dodir /etc/vmware/init.d/rc6.d
+vmware_create_initd() {
+ dodir /etc/vmware-tools/init.d
+ dodir /etc/vmware-tools/init.d/rc0.d
+ dodir /etc/vmware-tools/init.d/rc1.d
+ dodir /etc/vmware-tools/init.d/rc2.d
+ dodir /etc/vmware-tools/init.d/rc3.d
+ dodir /etc/vmware-tools/init.d/rc4.d
+ dodir /etc/vmware-tools/init.d/rc5.d
+ dodir /etc/vmware-tools/init.d/rc6.d
# This is to fix a problem where if someone merges vmware and then
# before configuring vmware they upgrade or re-merge the vmware
# package which would rmdir the /etc/vmware/init.d/rc?.d directories.
keepdir /etc/vmware/init.d/rc{0,1,2,3,4,5,6}.d
+}
+vmware_run_questions() {
# Questions:
einfo "Adding answers to /etc/vmware/locations"
locations="${D}/etc/vmware-tools/locations"
@@ -70,10 +50,58 @@ src_install() {
echo "answer LIBDIR ${dir}/lib" >> ${locations}
echo "answer MANDIR ${dir}/man" >> ${locations}
echo "answer DOCDIR ${dir}/doc" >> ${locations}
+ echo "answer SBINDIR ${dir}/sbin" >> ${locations}
echo "answer RUN_CONFIGURATOR no" >> ${locations}
echo "answer INITDIR /etc/vmware/init.d" >> ${locations}
echo "answer INITSCRIPTSDIR /etc/vmware/init.d" >> ${locations}
+}
+
+pkg_setup() {
+ einfo "You will need ${TARBALL} from the VMware installation."
+ einfo "Select VM->Install VMware Tools from VMware Workstation's menu."
+ cdrom_get_cds ${TARBALL}
+}
+
+src_unpack() {
+ tar xf "${CDROM_ROOT}"/"${TARBALL}"
+}
+
+src_install() {
+ dodir ${dir}/bin
+ cp -pPR bin/* ${Ddir}/bin || die
+
+ dodir ${dir}/lib
+ cp -dr lib/* ${Ddir}/lib || die
+ # Since with Gentoo we compile everthing it doesn't make sense to keep
+ # the precompiled modules arround. Saves about 4 megs of disk space too.
+ rm -rf ${Ddir}/lib/modules/binary || die
+
+ into ${dir}
+ # install the binaries
+ dosbin sbin/vmware-checkvm || die
+ dosbin sbin/vmware-guestd || die
+
+ # install the config files
+ dodir /etc/vmware-tools
+ cp -pPR etc/* ${D}/etc/vmware-tools || die
+
+ # install the init scripts
+ newinitd ${FILESDIR}/${PN}.rc vmware-tools || die
+
+ # Environment
+ doenvd ${FILESDIR}/90vmware-tools || die
+
+ # if we have X, install the default config
+ if use X ; then
+ insinto /etc/X11
+ doins ${FILESDIR}/xorg.conf
+ fi
+
+ vmware_create_initd || die
+
+ cp -pPR installer/services.sh ${D}/etc/vmware-tools/init.d/vmware || die
+ vmware_run_questions || die
}
pkg_postinst () {
@@ -87,31 +115,31 @@ pkg_postinst () {
#Note: it's a bit weird to use ${D} in a preinst script but it should work
#(drobbins, 1 Feb 2002)
- einfo "Generating /etc/vmware/locations file."
+ einfo "Generating /etc/vmware-tools/locations file."
d=`echo ${D} | wc -c`
- for x in `find ${Ddir} ${D}/etc/vmware` ; do
+ for x in `find ${Ddir} ${D}/etc/vmware-tools` ; do
x="`echo ${x} | cut -c ${d}-`"
if [ -d ${D}/${x} ] ; then
- echo "directory ${x}" >> ${D}/etc/vmware/locations
+ echo "directory ${x}" >> ${D}/etc/vmware-tools/locations
else
- echo -n "file ${x}" >> ${D}/etc/vmware/locations
- if [ "${x}" == "/etc/vmware/locations" ] ; then
- echo "" >> ${D}/etc/vmware/locations
- elif [ "${x}" == "/etc/vmware/not_configured" ] ; then
- echo "" >> ${D}/etc/vmware/locations
+ echo -n "file ${x}" >> ${D}/etc/vmware-tools/locations
+ if [ "${x}" == "/etc/vmware-tools/locations" ] ; then
+ echo "" >> ${D}/etc/vmware-tools/locations
+ elif [ "${x}" == "/etc/vmware-tools/not_configured" ] ; then
+ echo "" >> ${D}/etc/vmware-tools/locations
else
- echo -n " " >> ${D}/etc/vmware/locations
+ echo -n " " >> ${D}/etc/vmware-tools/locations
#perl -e "@a = stat('${D}${x}'); print \$a[9]" >> ${D}/etc/vmware/locations
- find ${D}${x} -printf %T@ >> ${D}/etc/vmware/locations
- echo "" >> ${D}/etc/vmware/locations
+ find ${D}${x} -printf %T@ >> ${D}/etc/vmware-tools/locations
+ echo "" >> ${D}/etc/vmware-tools/locations
fi
fi
done
einfo "To start using the vmware-tools, please run the following:"
einfo
einfo " /usr/bin/vmware-config-tools.pl"
- einfo " rc-update add ${PN} default"
- einfo " /etc/init.d/${PN} start"
+ einfo " rc-update add vmware-tools default"
+ einfo " /etc/init.d/vmware-tools start"
einfo
einfo "Please report all bugs to http://bugs.gentoo.org/"
}