summaryrefslogtreecommitdiff
blob: 97b13142185a2721a1e27ea781e8b23319b9ae3b (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-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-server-console/vmware-server-console-1.0.9.156507.ebuild,v 1.1 2009/05/09 21:59:41 ikelos Exp $

# Unlike many other binary packages the user doesn't need to agree to a licence
# to download VMWare. The agreeing to a licence is part of the configure step
# which the user must run manually.

inherit eutils versionator vmware

MY_PN=${PN/vm/VM}
MY_PV=$(replace_version_separator 3 '-')
MY_P="${MY_PN}-${MY_PV}"
FN="VMware-server-linux-client-${MY_PV}"
S="${WORKDIR}/${PN}-distrib"

DESCRIPTION="VMware Remote Console for Linux"
HOMEPAGE="http://www.vmware.com/"
SRC_URI="mirror://vmware/software/vmserver/${FN}.zip"

LICENSE="vmware"
IUSE=""
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
RESTRICT="strip"

DEPEND=">=sys-libs/glibc-2.3.5
	virtual/os-headers
	>=dev-lang/perl-5
	>=sys-apps/portage-2.0.54
	app-arch/unzip"

# vmware-server-console should not use virtual/libc as this is a
# precompiled binary package thats linked to glibc.
RDEPEND=">=sys-libs/glibc-2.3.5
	amd64? ( app-emulation/emul-linux-x86-gtklibs )
	!amd64? ( x11-libs/libSM
		x11-libs/libICE
		x11-libs/libX11
		x11-libs/libXau
		x11-libs/libXcursor
		x11-libs/libXdmcp
		x11-libs/libXext
		x11-libs/libXfixes
		x11-libs/libXft
		x11-libs/libXi
		x11-libs/libXrandr
		x11-libs/libXrender
		x11-libs/libXt
		x11-libs/libXtst )
	>=dev-lang/perl-5
	!<sys-apps/dbus-0.62"

etcdir="/etc/${PN}"
ANY_ANY=""

pkg_setup() {
	vmware_pkg_setup
	enewgroup "${VMWARE_GROUP}"
}

src_unpack() {
	cd "${WORKDIR}"
	unpack ${A}
	unpack ./${MY_P}.tar.gz
}

src_install() {
	echo 'libdir = "'${VMWARE_INSTALL_DIR}'/lib"' > etc/config
	vmware_src_install

	# Fix an ugly GCC error on start
	rm -f "${D}${VMWARE_INSTALL_DIR}/lib/lib/libgcc_s.so.1/libgcc_s.so.1"
	make_desktop_entry ${PN} "VMWare Remote Console" ${PN}.png System

	dodir /usr/bin
	dosym ${VMWARE_INSTALL_DIR}/bin/${PN} /usr/bin/${PN}
}

pkg_config() {
	einfo "Running ${ROOT}${dir}/bin/vmware-config-server-console.pl"
	"${ROOT}${dir}/bin/vmware-config-server-console.pl"
}