/[gentoo-x86]/app-emulation/vmware-workstation/vmware-workstation-8.0.3.703057.ebuild
Gentoo

Contents of /app-emulation/vmware-workstation/vmware-workstation-8.0.3.703057.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jun 17 13:11:13 2012 UTC (11 months ago) by vadimk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
bump vmware desktop. bug 421269

(Portage version: 2.1.10.65/cvs/Linux x86_64)

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-workstation/vmware-workstation-8.0.3.703057.ebuild,v 1.1 2012/05/05 14:52:20 vadimk Exp $
4
5 EAPI="4"
6
7 inherit eutils versionator fdo-mime gnome2-utils pam vmware-bundle
8
9 MY_PN="VMware-Workstation"
10 MY_PV="$(replace_version_separator 3 - $PV)"
11 MY_P="${MY_PN}-Full-${MY_PV}"
12 PV_MINOR=$(get_version_component_range 3)
13
14 DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
15 HOMEPAGE="http://www.vmware.com/products/workstation/"
16 SRC_URI="
17 x86? ( ${MY_P}.i386.bundle )
18 amd64? ( ${MY_P}.x86_64.bundle )
19 "
20
21 LICENSE="vmware"
22 SLOT="0"
23 KEYWORDS="-* ~amd64 ~x86"
24 IUSE="cups doc gnome kde ovftool server vix vmware-tools"
25 RESTRICT="binchecks fetch mirror strip"
26
27 # vmware-workstation should not use virtual/libc as this is a
28 # precompiled binary package thats linked to glibc.
29 RDEPEND="dev-cpp/cairomm
30 dev-cpp/glibmm:2
31 dev-cpp/gtkmm:2.4
32 dev-cpp/libgnomecanvasmm
33 dev-cpp/libsexymm
34 dev-cpp/pangomm
35 dev-libs/atk
36 dev-libs/glib:2
37 dev-libs/icu
38 dev-libs/expat
39 dev-libs/libaio
40 dev-libs/libsigc++
41 dev-libs/libxml2
42 =dev-libs/openssl-0.9.8*
43 dev-libs/xmlrpc-c
44 gnome-base/libgnomecanvas
45 gnome-base/libgtop:2
46 gnome-base/librsvg:2
47 gnome-base/orbit
48 media-libs/fontconfig
49 media-libs/freetype
50 media-libs/libart_lgpl
51 =media-libs/libpng-1.2*
52 media-libs/libpng
53 net-misc/curl
54 cups? ( net-print/cups )
55 sys-devel/gcc
56 sys-fs/fuse
57 sys-libs/glibc
58 sys-libs/zlib
59 x11-libs/cairo
60 gnome? ( x11-libs/gksu )
61 kde? ( kde-base/kdesu )
62 x11-libs/gtk+:2
63 x11-libs/libgksu
64 x11-libs/libICE
65 x11-libs/libsexy
66 x11-libs/libSM
67 x11-libs/libX11
68 x11-libs/libXau
69 x11-libs/libxcb
70 x11-libs/libXcomposite
71 x11-libs/libXcursor
72 x11-libs/libXdamage
73 x11-libs/libXdmcp
74 x11-libs/libXext
75 x11-libs/libXfixes
76 x11-libs/libXft
77 x11-libs/libXi
78 x11-libs/libXinerama
79 x11-libs/libXrandr
80 x11-libs/libXrender
81 x11-libs/libXtst
82 x11-libs/pango
83 x11-libs/startup-notification
84 x11-themes/hicolor-icon-theme
85 !app-emulation/vmware-player"
86 PDEPEND="~app-emulation/vmware-modules-264.${PV_MINOR}
87 vmware-tools? ( app-emulation/vmware-tools )"
88
89 S=${WORKDIR}
90 VM_INSTALL_DIR="/opt/vmware"
91 VM_DATA_STORE_DIR="/var/lib/vmware/Shared VMs"
92 VM_HOSTD_USER="root"
93
94 pkg_nofetch() {
95 local bundle
96
97 if use x86; then
98 bundle="${MY_P}.i386.bundle"
99 elif use amd64; then
100 bundle="${MY_P}.x86_64.bundle"
101 fi
102
103 einfo "Please download ${bundle}"
104 einfo "from ${HOMEPAGE}"
105 einfo "and place it in ${DISTDIR}"
106 }
107
108 src_unpack() {
109 local component; for component in \
110 vmware-vmx \
111 vmware-player-app \
112 vmware-player-setup \
113 vmware-workstation \
114 vmware-network-editor \
115 vmware-network-editor-ui \
116 vmware-usbarbitrator
117 do
118 vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" "${component}" "${S}"
119 done
120
121 if use server; then
122 vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" vmware-workstation-server #"${S}"
123 fi
124
125 if use vix; then
126 vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" vmware-vix-core vmware-vix
127 vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" vmware-vix-lib-Workstation800andvSphere500 vmware-vix
128 fi
129 if use ovftool; then
130 vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" vmware-ovftool
131 fi
132
133 }
134
135 src_prepare() {
136 rm -f bin/vmware-modconfig
137 rm -rf lib/modules/binary
138 if use server; then
139 rm -f vmware-workstation-server/bin/{openssl,configure-hostd.sh}
140 fi
141
142 find "${S}" -name '*.a' -delete
143
144 # clean_bundled_libs
145 }
146
147 clean_bundled_libs() {
148 ebegin 'Removing superfluous libraries'
149 cd lib/lib || die
150 ldconfig -p | \
151 sed 's:^\s\+\([^(]*[^( ]\).*=> /.*$:\1:g;t;d' | \
152 fgrep -vx 'libcrypto.so.0.9.8
153 libssl.so.0.9.8i
154 libgcr.so.0
155 libglib-2.0.so.0' |
156 xargs -d'\n' -r rm -rf
157 eend
158 }
159
160 src_install() {
161 local major_minor=$(get_version_component_range 1-2 "${PV}")
162 local major_minor_revision=$(get_version_component_range 1-3 "${PV}")
163 local build=$(get_version_component_range 4 "${PV}")
164
165 # install the binaries
166 into "${VM_INSTALL_DIR}"
167 dobin bin/*
168
169 # install the libraries
170 insinto "${VM_INSTALL_DIR}"/lib/vmware
171 doins -r lib/*
172
173 # install the ancillaries
174 insinto /usr
175 doins -r share
176
177 if use cups; then
178 exeinto $(cups-config --serverbin)/filter
179 doexe extras/thnucups
180
181 insinto /etc/cups
182 doins -r etc/cups/*
183 fi
184
185 insinto /etc/xdg
186 doins -r etc/xdg/*
187
188 # install documentation
189 doman man/man1/vmware.1.gz
190
191 if use doc; then
192 dodoc doc/*
193 fi
194
195 insinto "${VM_INSTALL_DIR}"/lib/vmware/setup
196 doins vmware-config
197
198 # install vmware workstation server
199 if use server; then
200 dosbin sbin/*
201
202 cd "${S}"/vmware-workstation-server
203
204 # install binaries
205 into "${VM_INSTALL_DIR}"/lib/vmware
206 dobin bin/*
207
208 # install the libraries
209 insinto "${VM_INSTALL_DIR}"/lib/vmware/lib
210 doins -r lib/*
211
212 into "${VM_INSTALL_DIR}"
213 for tool in vmware-{hostd,vim-cmd,wssc-adminTool} ; do
214 cat > "${T}/${tool}" <<-EOF
215 #!/usr/bin/env bash
216 set -e
217
218 . /etc/vmware/bootstrap
219
220 exec "${VM_INSTALL_DIR}/lib/vmware/lib/wrapper-gtk24.sh" \\
221 "${VM_INSTALL_DIR}/lib/vmware/lib" \\
222 "${VM_INSTALL_DIR}/lib/vmware/bin/${tool}" \\
223 "${VM_INSTALL_DIR}/lib/vmware/libconf" "\$@"
224 EOF
225 dobin "${T}/${tool}"
226 done
227
228 insinto "${VM_INSTALL_DIR}"/lib/vmware
229 doins -r hostd
230
231 # create the configuration
232 insinto /etc/vmware/hostd
233 doins -r config/etc/vmware/hostd/*
234 doins -r etc/vmware/hostd/*
235
236 insinto /etc/vmware/ssl
237 doins etc/vmware/ssl/*
238
239 # pam
240 pamd_mimic_system vmware-authd auth account
241
242 # create directory for shared virtual machines.
243 keepdir "${VM_DATA_STORE_DIR}"
244 keepdir /var/log/vmware
245 fi
246
247 # install vmware-vix
248 if use vix; then
249 cd "${S}"/vmware-vix
250
251 # install the binary
252 into "${VM_INSTALL_DIR}"
253 dobin bin/*
254
255 # install the libraries
256 insinto "${VM_INSTALL_DIR}"/lib/vmware-vix
257 doins -r lib/*
258
259 dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so
260
261 # install headers
262 insinto /usr/include/vmware-vix
263 doins include/*
264
265 if use doc; then
266 dohtml -r doc/*
267 fi
268 fi
269
270 # install ovftool
271 if use ovftool; then
272 cd "${S}"
273
274 insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
275 doins -r vmware-ovftool/*
276
277 chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
278 dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
279 fi
280
281 # create symlinks for the various tools
282 local tool ; for tool in thnuclnt vmware vmplayer{,-daemon} \
283 vmware-{acetool,enter-serial,gksu,fuseUI,modconfig{,-console},netcfg,tray,unity-helper} ; do
284 dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
285 done
286 dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
287 dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware "${VM_INSTALL_DIR}"/bin/vmware
288 dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
289
290 # fixing gksu problem
291 if use gnome; then
292 dosym /usr/bin/gksu "${VM_INSTALL_DIR}"/bin/vmware-gksu
293 fi
294 if use kde; then
295 dosym /usr/bin/kdesu "${VM_INSTALL_DIR}"/bin/vmware-gksu
296 fi
297
298 # fix permissions
299 fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
300 fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/{wrapper-gtk24.sh,libgksu2.so.0/gksu-run-helper}
301 fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/setup/vmware-config
302 fperms 4711 "${VM_INSTALL_DIR}"/bin/vmware-mount
303 fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
304 if use server; then
305 fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-{hostd,vim-cmd,wssc-adminTool}
306 fperms 4711 "${VM_INSTALL_DIR}"/sbin/vmware-authd
307 fi
308 if use vix; then
309 fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config
310 fi
311
312 # create the environment
313 local envd="${T}/90vmware"
314 cat > "${envd}" <<-EOF
315 PATH='${VM_INSTALL_DIR}/bin'
316 ROOTPATH='${VM_INSTALL_DIR}/bin'
317 EOF
318 doenvd "${envd}"
319
320 # create the configuration
321 dodir /etc/vmware
322
323 cat > "${D}"/etc/vmware/bootstrap <<-EOF
324 BINDIR='${VM_INSTALL_DIR}/bin'
325 LIBDIR='${VM_INSTALL_DIR}/lib'
326 EOF
327
328 cat > "${D}"/etc/vmware/config <<-EOF
329 bindir = "${VM_INSTALL_DIR}/bin"
330 libdir = "${VM_INSTALL_DIR}/lib/vmware"
331 initscriptdir = "/etc/init.d"
332 authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
333 gksu.rootMethod = "su"
334 VMCI_CONFED = "yes"
335 VMBLOCK_CONFED = "yes"
336 VSOCK_CONFED = "yes"
337 NETWORKING = "yes"
338 player.product.version = "${major_minor_revision}"
339 product.version = "${major_minor_revision}"
340 product.buildNumber = "${build}"
341 product.name = "VMware Workstation"
342 workstation.product.version = "${major_minor_revision}"
343 EOF
344
345 if use vix; then
346 cat >> "${D}"/etc/vmware/config <<-EOF
347 vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware"
348 vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix"
349 vix.config.version = "1"
350 EOF
351 fi
352
353 if use server; then
354 cat >> "${D}"/etc/vmware/config <<-EOF
355 authd.client.port = "902"
356 authd.proxy.nfc = "vmware-hostd:ha-nfc"
357 authd.soapserver = "TRUE"
358 EOF
359 fi
360
361 # install the init.d script
362 local initscript="${T}/vmware.rc"
363 sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
364 "${FILESDIR}/vmware-${major_minor}.rc" > ${initscript}
365 newinitd "${initscript}" vmware
366
367 if use server; then
368 # install the init.d script
369 local initscript="${T}/vmware-workstation-server.rc"
370 sed -e "s:@@ETCDIR@@:/etc/vmware:g" \
371 -e "s:@@PREFIX@@:${VM_INSTALL_DIR}:g" \
372 -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
373 -e "s:@@LIBDIR@@:${VM_INSTALL_DIR}/lib/vmware:g" \
374 "${FILESDIR}/vmware-server-8.0.rc" > ${initscript}
375 newinitd "${initscript}" vmware-workstation-server
376 fi
377
378 # fill in variable placeholders
379 sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
380 -i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}}
381 sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware:g" \
382 -i "${D}/usr/share/applications/${PN}.desktop"
383 sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
384 -i "${D}/usr/share/applications/vmware-player.desktop"
385 sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware-netcfg:g" \
386 -i "${D}/usr/share/applications/vmware-netcfg.desktop"
387
388 if use server; then
389 # Configuration for vmware-workstation-server
390 local hostdUser="${VM_HOSTD_USER:-root}"
391 sed -e "/ACEDataUser/s:root:${hostdUser}:g" \
392 -i "${D}/etc/vmware/hostd/authorization.xml" || die
393
394 # Shared VMs Path: [standard].
395 sed -e "s:##{DS_NAME}##:standard:g" \
396 -e "s:##{DS_PATH}##:${VM_DATA_STORE_DIR}:g" \
397 -i "${D}/etc/vmware/hostd/datastores.xml" || die
398
399 sed -e "s:##{HTTP_PORT}##:-1:g" \
400 -e "s:##{HTTPS_PORT}##:443:g" \
401 -e "s:##{PIPE_PREFIX}##:/var/run/vmware/:g" \
402 -i "${D}/etc/vmware/hostd/proxy.xml" || die
403
404 # See vmware-workstation-server.py for more details.
405 sed -e "s:##{BUILD_CFGDIR}##:/etc/vmware/hostd/:g" \
406 -e "s:##{CFGALTDIR}##:/etc/vmware/hostd/:g" \
407 -e "s:##{CFGDIR}##:/etc/vmware/:g" \
408 -e "s:##{ENABLE_AUTH}##:true:g" \
409 -e "s:##{HOSTDMODE}##:ws:g" \
410 -e "s:##{HOSTD_CFGDIR}##:/etc/vmware/hostd/:g" \
411 -e "s:##{HOSTD_MOCKUP}##:false:g" \
412 -e "s:##{LIBDIR}##:${VM_INSTALL_DIR}/lib/vmware:g" \
413 -e "s:##{LIBDIR_INSTALLED}##:${VM_INSTALL_DIR}/lib/vmware/:g" \
414 -e "s:##{LOGDIR}##:/var/log/vmware/:g" \
415 -e "s:##{LOGLEVEL}##:verbose:g" \
416 -e "s:##{MOCKUP}##:mockup-host-config.xml:g" \
417 -e "s:##{PLUGINDIR}##:./:g" \
418 -e "s:##{SHLIB_PREFIX}##:lib:g" \
419 -e "s:##{SHLIB_SUFFIX}##:.so:g" \
420 -e "s:##{USE_BLKLISTSVC}##:false:g" \
421 -e "s:##{USE_CBRCSVC}##:false:g" \
422 -e "s:##{USE_CIMSVC}##:false:g" \
423 -e "s:##{USE_DIRECTORYSVC}##:false:g" \
424 -e "s:##{USE_DIRECTORYSVC_MOCKUP}##:false:g" \
425 -e "s:##{USE_DYNAMIC_PLUGIN_LOADING}##:false:g" \
426 -e "s:##{USE_DYNAMO}##:false:g" \
427 -e "s:##{USE_DYNSVC}##:false:g" \
428 -e "s:##{USE_GUESTSVC}##:false:g" \
429 -e "s:##{USE_HBRSVC}##:false:g" \
430 -e "s:##{USE_HBRSVC_MOCKUP}##:false:g" \
431 -e "s:##{USE_HOSTSVC_MOCKUP}##:false:g" \
432 -e "s:##{USE_HTTPNFCSVC}##:false:g" \
433 -e "s:##{USE_HTTPNFCSVC_MOCKUP}##:false:g" \
434 -e "s:##{USE_LICENSESVC_MOCKUP}##:false:g" \
435 -e "s:##{USE_NFCSVC}##:true:g" \
436 -e "s:##{USE_NFCSVC_MOCKUP}##:false:g" \
437 -e "s:##{USE_OVFMGRSVC}##:true:g" \
438 -e "s:##{USE_PARTITIONSVC}##:false:g" \
439 -e "s:##{USE_SECURESOAP}##:false:g" \
440 -e "s:##{USE_SNMPSVC}##:false:g" \
441 -e "s:##{USE_SOLO_MOCKUP}##:false:g" \
442 -e "s:##{USE_STATSSVC_MOCKUP}##:false:g" \
443 -e "s:##{USE_VCSVC_MOCKUP}##:false:g" \
444 -e "s:##{USE_VDISKSVC}##:false:g" \
445 -e "s:##{USE_VDISKSVC_MOCKUP}##:false:g" \
446 -e "s:##{USE_VMSVC_MOCKUP}##:false:g" \
447 -e "s:##{VM_INVENTORY}##:vmInventory.xml:g" \
448 -e "s:##{VM_RESOURCES}##:vmResources.xml:g" \
449 -e "s:##{WEBSERVER_PORT_ENTRY}##::g" \
450 -e "s:##{WORKINGDIR}##:./:g" \
451 -i "${D}/etc/vmware/hostd/config.xml" || die
452
453 sed -e "s:##{ENV_LOCATION}##:/etc/vmware/hostd/env/:g" \
454 -i "${D}/etc/vmware/hostd/environments.xml" || die
455
456 # @@VICLIENT_URL@@=XXX
457 sed -e "s:@@AUTHD_PORT@@:902:g" \
458 -i "${D}${VM_INSTALL_DIR}/lib/vmware/hostd/docroot/client/clients.xml" || die
459 fi
460 }
461
462 pkg_config() {
463 "${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
464 }
465
466 pkg_preinst() {
467 gnome2_icon_savelist
468 }
469
470 pkg_postinst() {
471 fdo-mime_desktop_database_update
472 gnome2_icon_cache_update
473
474 ewarn "/etc/env.d was updated. Please run:"
475 ewarn "env-update && source /etc/profile"
476 ewarn ""
477 ewarn "Before you can use vmware workstation, you must configure a default network setup."
478 ewarn "You can do this by running 'emerge --config ${PN}'."
479 }
480
481 pkg_prerm() {
482 einfo "Stopping ${PN} for safe unmerge"
483 /etc/init.d/vmware stop
484 }
485
486 pkg_postrm() {
487 fdo-mime_desktop_database_update
488 gnome2_icon_cache_update
489 }

  ViewVC Help
Powered by ViewVC 1.1.13