/[gentoo-x86]/app-emulation/vmware-vix/vmware-vix-1.11.4.744019.ebuild
Gentoo

Contents of /app-emulation/vmware-vix/vmware-vix-1.11.4.744019.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Oct 29 14:51:08 2012 UTC (5 years, 11 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
QA: binchecks should not be restricted.

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-vix/vmware-vix-1.11.4.744019.ebuild,v 1.1 2012/06/17 13:11:52 vadimk Exp $
4
5 EAPI="4"
6
7 inherit eutils versionator vmware-bundle
8
9 MY_PN="VMware-VIX"
10 MY_PV="$(replace_version_separator 3 - $PV)"
11 MY_P="${MY_PN}-${MY_PV}"
12
13 DESCRIPTION="VMware VIX API for Linux"
14 HOMEPAGE="http://www.vmware.com/support/developer/vix-api/"
15 SRC_URI="
16 x86? ( ${MY_P}.i386.bundle )
17 amd64? ( ${MY_P}.x86_64.bundle )
18 "
19
20 LICENSE="vmware"
21 SLOT="0"
22 KEYWORDS="-* ~amd64 ~x86"
23 IUSE="doc"
24 RESTRICT="fetch mirror strip"
25
26 # vmware-workstation should not use virtual/libc as this is a
27 # precompiled binary package thats linked to glibc.
28 RDEPEND="
29 dev-libs/glib:2
30 dev-libs/libxml2
31 =dev-libs/openssl-0.9.8*
32 net-misc/curl
33 sys-libs/glibc
34 sys-libs/zlib
35 !app-emulation/vmware-workstation"
36
37 S=${WORKDIR}
38 VM_INSTALL_DIR="/opt/vmware"
39
40 pkg_nofetch() {
41 local bundle
42
43 if use x86; then
44 bundle="${MY_P}.i386.bundle"
45 elif use amd64; then
46 bundle="${MY_P}.x86_64.bundle"
47 fi
48
49 einfo "Please download ${bundle}"
50 einfo "from ${HOMEPAGE}"
51 einfo "and place it in ${DISTDIR}"
52 }
53
54 src_unpack() {
55 local component; for component in \
56 vmware-vix \
57 vmware-vix-core \
58 vmware-vix-lib-Workstation800andvSphere500
59 #vmware-vix-legacy \
60 do
61 vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" "${component}" "${S}"
62 done
63 }
64
65 src_install() {
66 # install the binary
67 into "${VM_INSTALL_DIR}"
68 dobin bin/*
69
70 # install the libraries
71 insinto "${VM_INSTALL_DIR}"/lib/vmware-vix
72 doins -r lib/*
73
74 dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so
75
76 # install headers
77 insinto /usr/include/vmware-vix
78 doins include/*
79
80 if use doc; then
81 dohtml -r doc/*
82 fi
83
84 # fix permissions
85 fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config
86
87 # create the environment
88 local envd="${T}/90${PN}"
89 cat > "${envd}" <<-EOF
90 PATH='${VM_INSTALL_DIR}/bin'
91 ROOTPATH='${VM_INSTALL_DIR}/bin'
92 EOF
93 doenvd "${envd}"
94
95 # create the configuration
96 dodir /etc/vmware
97
98 local vmconfig="${T}/config"
99 if [[ -e ${ROOT}/etc/vmware/config ]]
100 then
101 cp -a "${ROOT}"/etc/vmware/config "${vmconfig}"
102 sed -i -e "/vmware.fullpath/d" "${vmconfig}"
103 sed -i -e "/vix.libdir/d" "${vmconfig}"
104 sed -i -e "/vix.config.version/d" "${vmconfig}"
105 fi
106
107 cat >> "${vmconfig}" <<-EOF
108 vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware"
109 vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix"
110 vix.config.version = "1"
111 EOF
112
113 insinto /etc/vmware/
114 doins "${vmconfig}"
115 }
116
117 pkg_postinst() {
118 ewarn "/etc/env.d was updated. Please run:"
119 ewarn "env-update && source /etc/profile"
120 }
121
122 pkg_prerm() {
123 sed -i -e "/vix.libdir/d" "${ROOT}"/etc/vmware/config
124 }

  ViewVC Help
Powered by ViewVC 1.1.20