summaryrefslogtreecommitdiff
blob: 495be2f927deade9038eb467a455506d8a9ec401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 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.2.ebuild,v 1.2 2006/05/08 13:08:44 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="vmware-linux-tools.tar.gz"
LICENSE="vmware"
SLOT="0"
KEYWORDS="~x86"
IUSE="X"
RESTRICT="fetch"

DEPEND=""
#RDEPEND=""

S=${WORKDIR}/vmware-tools-distrib

src_install() {
	# install the binaries
	dosbin sbin/vmware-checkvm
	dosbin sbin/vmware-guestd
	dobin bin/vmware-config-tools.pl
	dobin bin/vmware-toolbox

	# NOTE: we deliberately do NOT install the vmware-uninstall-tools.pl
	# script
	#
	# if you want to uninstall vmware from this machine, use Portage!

	# install the config files
	insinto /etc/vmware-tools
	for x in \
		installer.sh \
		not_configured \
		poweroff-vm-default \
		poweron-vm-default \
		resume-vm-default \
		suspend-vm-default \
	; do
		doins etc/$x
	done

	# populate the locations file
	# we replace the timestamp in that file with the current
	# timestamp

	insinto /etc/vmware-tools
	doins ${FILESDIR}/${PV}/locations
	timestamp="`date '+%s'`"
	sed -i "s|1109770680|$timestamp|g" ${D}/etc/vmware-tools/locations

	# 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}/vmware-linux-tools

	# if we have X, install the default config
	if useq X ; then
		insinto /etc/X11
		doins ${FILESDIR}/${PV}/xorg.conf
	fi

	# and we're done
}

pkg_postinst ()
{
	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
	einfo "Please report all bugs to http://bugs.gentoo.org/"
}