Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-workstation/
Date: Tue, 22 Sep 2015 22:01:16
Message-Id: 1442959256.236d0ef85eb0c0023c14f95229cc03e12d083e12.dilfridge@gentoo
1 commit: 236d0ef85eb0c0023c14f95229cc03e12d083e12
2 Author: Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 22 22:00:56 2015 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 22 22:00:56 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/vmware.git/commit/?id=236d0ef8
7
8 app-emulation/vmware-workstation: Start sorting out the bundled libraries mess. Work in progress.
9
10 Package-Manager: portage-2.2.20.1
11
12 app-emulation/vmware-workstation/Manifest | 1 +
13 app-emulation/vmware-workstation/metadata.xml | 1 +
14 .../vmware-workstation-11.1.2.2780323-r2.ebuild | 518 +++++++++++++++++++++
15 3 files changed, 520 insertions(+)
16
17 diff --git a/app-emulation/vmware-workstation/Manifest b/app-emulation/vmware-workstation/Manifest
18 index 1771a22..05bc0ee 100644
19 --- a/app-emulation/vmware-workstation/Manifest
20 +++ b/app-emulation/vmware-workstation/Manifest
21 @@ -2,3 +2,4 @@ DIST VMware-Workstation-10.0.6-2700073.i386.bundle.tar 281272320 SHA256 02b6c26b
22 DIST VMware-Workstation-10.0.6-2700073.x86_64.bundle.tar 252610560 SHA256 e29edcb0638f32bff81d372c9eaf54e663e3376cd1d89dbd4cfe4cab533398b2 SHA512 072de1da92cbef890707a6c4e3d5223fdc60e50a5166bb72b1ebc098d28c1a75b83ed65a29fdf1311e119e590560546e376909e1384f1eab05918500ec80ede4 WHIRLPOOL 3f4252abb6c87424b88fa34adc29e1927d1e6458beca65d9b290ff0c8ad4ccaf2945e2209670f8f8d4e84548d806c18fb23dc8380ec65452841e2c0bbcce89aa
23 DIST VMware-Workstation-11.1.2-2780323.x86_64.bundle.tar 259133440 SHA256 085b50175b253647d8b2cb188286d3cf9265ed246cc0deb3b142b0438ef5725f SHA512 1c43ebaa4f8b228ec00f24a263eddcbbad5c0c940cd67040e6e2275c3a4aab6c9e2e5ee96996ca4f007ff786ece978c5789214ad92479720182fc3153d7edbde WHIRLPOOL 60e359a1dcfe1178652d8c6be705dda4f2f31b109bf01d5b5b16dc03e26a649e8f1af2ffa03d68e9108646c98e9cad41c10a9452ea14950883f9162e57ac20ca
24 DIST gentoo-01.tar.gz 1884 SHA256 e92c694865f1b29f4d7a39efa1dd87bc71dc5f922573f00a3d31ee8e27a8c335 SHA512 454ab93997781bd0a9accddb2ac7bb446f07ea7cddef5640369025c30e03592e14869e0f0f7b4457db2f1ada31c98051426016c86201afa8bc8e3aa4ccc2f875 WHIRLPOOL 9202583b617532ab2612b384da307218e7c93c2962f0d233e28bea066b07163c9bc51c0a599309f9d703c5575ebeb292d787716225624dc1c2fdff3c44fa3513
25 +DIST vmware-systemd-gentoo-01.tgz 1884 SHA256 e92c694865f1b29f4d7a39efa1dd87bc71dc5f922573f00a3d31ee8e27a8c335 SHA512 454ab93997781bd0a9accddb2ac7bb446f07ea7cddef5640369025c30e03592e14869e0f0f7b4457db2f1ada31c98051426016c86201afa8bc8e3aa4ccc2f875 WHIRLPOOL 9202583b617532ab2612b384da307218e7c93c2962f0d233e28bea066b07163c9bc51c0a599309f9d703c5575ebeb292d787716225624dc1c2fdff3c44fa3513
26
27 diff --git a/app-emulation/vmware-workstation/metadata.xml b/app-emulation/vmware-workstation/metadata.xml
28 index 7570b9e..f6f81f1 100644
29 --- a/app-emulation/vmware-workstation/metadata.xml
30 +++ b/app-emulation/vmware-workstation/metadata.xml
31 @@ -7,6 +7,7 @@
32 other operating systems in a virtual environment to run on top of Gentoo.
33 </longdescription>
34 <use>
35 + <flag name="bundled-libs">Use precompiled bundled libraries instead of the system installation</flag>
36 <flag name="ovftool">Install OVF tool.</flag>
37 <flag name="server">Install VMware Workstation Server component.</flag>
38 <flag name="vix">Install VIX. The VIX API allows you to write programs and scripts
39
40 diff --git a/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r2.ebuild b/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r2.ebuild
41 new file mode 100644
42 index 0000000..4f47f7d
43 --- /dev/null
44 +++ b/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r2.ebuild
45 @@ -0,0 +1,518 @@
46 +# Copyright 1999-2015 Gentoo Foundation
47 +# Distributed under the terms of the GNU General Public License v2
48 +# $Id$
49 +
50 +EAPI=5
51 +
52 +inherit eutils versionator readme.gentoo fdo-mime systemd gnome2-utils pam vmware-bundle
53 +
54 +MY_PN="VMware-Workstation"
55 +MY_PV=$(get_version_component_range 1-3)
56 +PV_MINOR=$(get_version_component_range 3)
57 +PV_BUILD=$(get_version_component_range 4)
58 +MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}"
59 +
60 +SYSTEMD_UNITS_TAG="gentoo-01"
61 +
62 +DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
63 +HOMEPAGE="http://www.vmware.com/products/workstation/"
64 +BASE_URI="https://softwareupdate.vmware.com/cds/vmw-desktop/ws/${MY_PV}/${PV_BUILD}/linux/core/"
65 +SRC_URI="
66 + amd64? ( ${BASE_URI}${MY_P}.x86_64.bundle.tar )
67 + https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz
68 + "
69 +LICENSE="vmware GPL-2"
70 +SLOT="0"
71 +#KEYWORDS="-* ~amd64"
72 +IUSE="cups bundled-libs doc ovftool server vix vmware-tools"
73 +RESTRICT="mirror strip"
74 +
75 +BUNDLED_LIBS_DIR=/opt/vmware/lib/vmware/lib
76 +
77 +BUNDLED_LIBS="
78 + libXau.so.6
79 + libXcomposite.so.1
80 + libXcursor.so.1
81 + libXdamage.so.1
82 + libXdmcp.so.6
83 + libXfixes.so.3
84 + libXft.so.2
85 + libXinerama.so.1
86 +"
87 +
88 +BUNDLED_LIB_DEPENDS="
89 + x11-libs/libXau
90 + x11-libs/libXcomposite
91 + x11-libs/libXcursor
92 + x11-libs/libXdamage
93 + x11-libs/libXdmcp
94 + x11-libs/libXfixes
95 + x11-libs/libXft
96 + x11-libs/libXinerama
97 +"
98 +
99 +# vmware-workstation should not use virtual/libc as this is a
100 +# precompiled binary package thats linked to glibc.
101 +RDEPEND="dev-cpp/cairomm
102 + dev-cpp/glibmm:2
103 + dev-cpp/gtkmm:2.4
104 + dev-cpp/libgnomecanvasmm
105 + dev-cpp/pangomm
106 + dev-libs/atk
107 + dev-libs/glib:2
108 + dev-libs/icu
109 + dev-libs/expat
110 + dev-libs/libaio
111 + =dev-libs/libgcrypt-1.5*
112 + dev-libs/libsigc++:2
113 + dev-libs/libxml2
114 + dev-libs/openssl:0.9.8
115 + dev-libs/xmlrpc-c
116 + gnome-base/libgnomecanvas
117 + gnome-base/libgtop:2
118 + gnome-base/librsvg:2
119 + gnome-base/orbit
120 + media-libs/fontconfig
121 + media-libs/freetype
122 + media-libs/libart_lgpl
123 + media-libs/libpng:1.2
124 + media-libs/libpng
125 + media-libs/tiff:3
126 + net-misc/curl
127 + cups? ( net-print/cups )
128 + sys-devel/gcc
129 + sys-fs/fuse
130 + sys-libs/glibc
131 + sys-libs/zlib
132 + x11-libs/cairo
133 + x11-libs/gtk+:2
134 + x11-libs/libgksu
135 + x11-libs/libICE
136 + x11-libs/libSM
137 + x11-libs/libX11
138 + x11-libs/libxcb
139 + x11-libs/libXext
140 + x11-libs/libXi
141 + x11-libs/libXrandr
142 + x11-libs/libXrender
143 + x11-libs/libXtst
144 + x11-libs/pango
145 + x11-libs/pangox-compat
146 + x11-libs/startup-notification
147 + x11-themes/hicolor-icon-theme
148 + !app-emulation/vmware-player
149 + !bundled-libs? ( ${BUNDLED_LIB_DEPENDS} )
150 +"
151 +PDEPEND="~app-emulation/vmware-modules-304.${PV_MINOR}
152 + vmware-tools? ( app-emulation/vmware-tools )"
153 +
154 +S=${WORKDIR}
155 +VM_INSTALL_DIR="/opt/vmware"
156 +VM_DATA_STORE_DIR="/var/lib/vmware/Shared VMs"
157 +VM_HOSTD_USER="root"
158 +
159 +QA_PREBUILT="/opt/*"
160 +
161 +QA_WX_LOAD="/opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 /opt/vmware/lib/vmware/bin/vmware-vmx-stats /opt/vmware/lib/vmware/bin/vmware-vmx-debug /opt/vmware/lib/vmware/bin/vmware-vmx"
162 +
163 +src_unpack() {
164 + default
165 + local bundle
166 + use amd64 && bundle=${MY_P}.x86_64.bundle
167 + local component; for component in \
168 + vmware-vmx \
169 + vmware-player-app \
170 + vmware-player-setup \
171 + vmware-workstation \
172 + vmware-network-editor \
173 + vmware-network-editor-ui \
174 + vmware-usbarbitrator \
175 + vmware-vprobe
176 + do
177 + vmware-bundle_extract-bundle-component "${bundle}" "${component}" "${S}"
178 + done
179 +
180 + if use server; then
181 + vmware-bundle_extract-bundle-component "${bundle}" vmware-workstation-server #"${S}"
182 + fi
183 +
184 + if use vix; then
185 + vmware-bundle_extract-bundle-component "${bundle}" vmware-vix-core vmware-vix
186 + vmware-bundle_extract-bundle-component "${bundle}" vmware-vix-lib-Workstation1100andvSphere600 vmware-vix
187 + fi
188 + if use ovftool; then
189 + vmware-bundle_extract-bundle-component "${bundle}" vmware-ovftool
190 + fi
191 +}
192 +
193 +clean_bundled_libs() {
194 + einfo Removing bundled libraries
195 + for libname in ${BUNDLED_LIBS} ; do
196 + rm -rv "${S}"/lib/lib/${libname} || die "Failed removing bundled ${libname}"
197 + done
198 +}
199 +
200 +src_prepare() {
201 + rm -f bin/vmware-modconfig
202 + rm -rf lib/modules/binary
203 + # Bug 459566
204 + mv lib/libvmware-netcfg.so lib/lib/
205 +
206 + if use server; then
207 + rm -f vmware-workstation-server/bin/{openssl,configure-hostd.sh}
208 + fi
209 +
210 + find "${S}" -name '*.a' -delete
211 +
212 + clean_bundled_libs
213 +
214 + DOC_CONTENTS="
215 +/etc/env.d is updated during ${PN} installation. Please run:\n
216 +env-update && source /etc/profile\n
217 +Before you can use vmware workstation, you must configure a default network setup.
218 +You can do this by running 'emerge --config ${PN}'.\n
219 +To be able to run ${PN} your user must be in the vmware group.
220 +"
221 +}
222 +
223 +src_install() {
224 + local major_minor=$(get_version_component_range 1-2 "${PV}")
225 + local major_minor_revision=$(get_version_component_range 1-3 "${PV}")
226 + local build=$(get_version_component_range 4 "${PV}")
227 +
228 + # revdep-rebuild entry
229 + insinto /etc/revdep-rebuild
230 + echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN}
231 + doins "${T}"/10${PN}
232 +
233 + # install the binaries
234 + into "${VM_INSTALL_DIR}"
235 + dobin bin/*
236 +
237 + # install the libraries
238 + insinto "${VM_INSTALL_DIR}"/lib/vmware
239 + doins -r lib/*
240 +
241 + # Bug 432918
242 + dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libcrypto.so.0.9.8/libcrypto.so.0.9.8 \
243 + "${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libcrypto.so.0.9.8
244 + dosym "${VM_INSTALL_DIR}"/lib/vmware/lib/libssl.so.0.9.8/libssl.so.0.9.8 \
245 + "${VM_INSTALL_DIR}"/lib/vmware/lib/libvmwarebase.so.0/libssl.so.0.9.8
246 +
247 + # install the ancillaries
248 + insinto /usr
249 + doins -r share
250 +
251 + if use cups; then
252 + exeinto $(cups-config --serverbin)/filter
253 + doexe extras/thnucups
254 +
255 + insinto /etc/cups
256 + doins -r etc/cups/*
257 + fi
258 +
259 + insinto /etc/xdg
260 + doins -r etc/xdg/*
261 +
262 + # install documentation
263 + doman man/man1/vmware.1.gz
264 +
265 + if use doc; then
266 + dodoc doc/*
267 + fi
268 +
269 + insinto "${VM_INSTALL_DIR}"/lib/vmware/setup
270 + doins vmware-config
271 +
272 + # install vmware workstation server
273 + if use server; then
274 + dosbin sbin/*
275 +
276 + cd "${S}"/vmware-workstation-server
277 +
278 + # install binaries
279 + into "${VM_INSTALL_DIR}"/lib/vmware
280 + dobin bin/*
281 +
282 + dobin "${FILESDIR}"/configure-hostd.sh
283 +
284 + dobin "${FILESDIR}"/configure-hostd.sh
285 +
286 + # install the libraries
287 + insinto "${VM_INSTALL_DIR}"/lib/vmware/lib
288 + doins -r lib/*
289 +
290 + into "${VM_INSTALL_DIR}"
291 + for tool in vmware-{hostd,wssc-adminTool} ; do
292 + cat > "${T}/${tool}" <<-EOF
293 + #!/usr/bin/env bash
294 + set -e
295 +
296 + . /etc/vmware/bootstrap
297 +
298 + exec "${VM_INSTALL_DIR}/lib/vmware/lib/wrapper-gtk24.sh" \\
299 + "${VM_INSTALL_DIR}/lib/vmware/lib" \\
300 + "${VM_INSTALL_DIR}/lib/vmware/bin/${tool}" \\
301 + "${VM_INSTALL_DIR}/lib/vmware/libconf" "\$@"
302 + EOF
303 + dobin "${T}/${tool}"
304 + done
305 +
306 + insinto "${VM_INSTALL_DIR}"/lib/vmware
307 + doins -r hostd
308 +
309 + # create the configuration
310 + insinto /etc/vmware/hostd
311 + doins -r config/etc/vmware/hostd/*
312 + doins -r etc/vmware/hostd/*
313 +
314 + insinto /etc/vmware/ssl
315 + doins etc/vmware/ssl/*
316 +
317 + # pam
318 + pamd_mimic_system vmware-authd auth account
319 +
320 + # create directory for shared virtual machines.
321 + keepdir "${VM_DATA_STORE_DIR}"
322 + keepdir /var/log/vmware
323 + fi
324 +
325 + # install vmware-vix
326 + if use vix; then
327 + cd "${S}"/vmware-vix
328 +
329 + # install the binary
330 + into "${VM_INSTALL_DIR}"
331 + dobin bin/*
332 +
333 + # install the libraries
334 + insinto "${VM_INSTALL_DIR}"/lib/vmware-vix
335 + doins -r lib/*
336 +
337 + dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so
338 +
339 + # install headers
340 + insinto /usr/include/vmware-vix
341 + doins include/*
342 +
343 + if use doc; then
344 + dohtml -r doc/*
345 + fi
346 + fi
347 +
348 + # install ovftool
349 + if use ovftool; then
350 + cd "${S}"
351 +
352 + insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool
353 + doins -r vmware-ovftool/*
354 +
355 + chmod 0755 "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin}
356 + dosym "${D}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool
357 + fi
358 +
359 + # create symlinks for the various tools
360 + local tool ; for tool in thnuclnt vmware vmplayer{,-daemon} licenseTool vmamqpd \
361 + vmware-{acetool,enter-serial,gksu,fuseUI,modconfig{,-console},netcfg,tray,unity-helper,zenity} ; do
362 + dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}"
363 + done
364 + dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer
365 + dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware "${VM_INSTALL_DIR}"/bin/vmware
366 + dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu
367 +
368 + # fix permissions
369 + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/{appLoader,fusermount,launcher.sh,mkisofs,vmware-remotemks}
370 + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/{wrapper-gtk24.sh,libgksu2.so.0/gksu-run-helper}
371 + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/setup/vmware-config
372 + fperms 4711 "${VM_INSTALL_DIR}"/bin/vmware-mount
373 + fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats}
374 + if use server; then
375 + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-{hostd,wssc-adminTool}
376 + fperms 4711 "${VM_INSTALL_DIR}"/sbin/vmware-authd
377 + fperms 1777 "${VM_DATA_STORE_DIR}"
378 + fi
379 + if use vix; then
380 + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config
381 + fi
382 +
383 + # create the environment
384 + local envd="${T}/90vmware"
385 + cat > "${envd}" <<-EOF
386 + PATH='${VM_INSTALL_DIR}/bin'
387 + ROOTPATH='${VM_INSTALL_DIR}/bin'
388 + EOF
389 + doenvd "${envd}"
390 +
391 + # create the configuration
392 + dodir /etc/vmware
393 +
394 + cat > "${D}"/etc/vmware/bootstrap <<-EOF
395 + BINDIR='${VM_INSTALL_DIR}/bin'
396 + LIBDIR='${VM_INSTALL_DIR}/lib'
397 + EOF
398 +
399 + cat > "${D}"/etc/vmware/config <<-EOF
400 + bindir = "${VM_INSTALL_DIR}/bin"
401 + libdir = "${VM_INSTALL_DIR}/lib/vmware"
402 + initscriptdir = "/etc/init.d"
403 + authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd"
404 + gksu.rootMethod = "su"
405 + VMCI_CONFED = "yes"
406 + VMBLOCK_CONFED = "yes"
407 + VSOCK_CONFED = "yes"
408 + NETWORKING = "yes"
409 + player.product.version = "${major_minor_revision}"
410 + product.version = "${major_minor_revision}"
411 + product.buildNumber = "${build}"
412 + product.name = "VMware Workstation"
413 + workstation.product.version = "${major_minor_revision}"
414 + EOF
415 +
416 + if use vix; then
417 + cat >> "${D}"/etc/vmware/config <<-EOF
418 + vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware"
419 + vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix"
420 + vix.config.version = "1"
421 + EOF
422 + fi
423 +
424 + if use server; then
425 + cat >> "${D}"/etc/vmware/config <<-EOF
426 + authd.client.port = "902"
427 + authd.proxy.nfc = "vmware-hostd:ha-nfc"
428 + authd.soapserver = "TRUE"
429 + EOF
430 + fi
431 +
432 + # install the init.d script
433 + local initscript="${T}/vmware.rc"
434 + sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
435 + "${FILESDIR}/vmware-${major_minor}.rc" > ${initscript}
436 + newinitd "${initscript}" vmware
437 +
438 + if use server; then
439 + # install the init.d script
440 + local initscript="${T}/vmware-workstation-server.rc"
441 + sed -e "s:@@ETCDIR@@:/etc/vmware:g" \
442 + -e "s:@@PREFIX@@:${VM_INSTALL_DIR}:g" \
443 + -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
444 + -e "s:@@LIBDIR@@:${VM_INSTALL_DIR}/lib/vmware:g" \
445 + "${FILESDIR}/vmware-server-${major_minor}.rc" > ${initscript}
446 + newinitd "${initscript}" vmware-workstation-server
447 + fi
448 +
449 + # fill in variable placeholders
450 + sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \
451 + -i "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/{gtk-2.0/{gdk-pixbuf.loaders,gtk.immodules},pango/pango{.modules,rc}}
452 + sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware:g" \
453 + -e "/^Encoding/d" \
454 + -i "${D}/usr/share/applications/${PN}.desktop"
455 + sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \
456 + -e "/^Encoding/d" \
457 + -i "${D}/usr/share/applications/vmware-player.desktop"
458 + sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmware-netcfg:g" \
459 + -e "/^Encoding/d" \
460 + -i "${D}/usr/share/applications/vmware-netcfg.desktop"
461 +
462 + if use server; then
463 + # Configuration for vmware-workstation-server
464 + local hostdUser="${VM_HOSTD_USER:-root}"
465 + sed -e "/ACEDataUser/s:root:${hostdUser}:g" \
466 + -i "${D}/etc/vmware/hostd/authorization.xml" || die
467 +
468 + # Shared VMs Path: [standard].
469 + sed -e "s:##{DS_NAME}##:standard:g" \
470 + -e "s:##{DS_PATH}##:${VM_DATA_STORE_DIR}:g" \
471 + -i "${D}/etc/vmware/hostd/datastores.xml" || die
472 +
473 + sed -e "s:##{HTTP_PORT}##:-1:g" \
474 + -e "s:##{HTTPS_PORT}##:443:g" \
475 + -e "s:##{PIPE_PREFIX}##:/var/run/vmware/:g" \
476 + -i "${D}/etc/vmware/hostd/proxy.xml" || die
477 +
478 + # See vmware-workstation-server.py for more details.
479 + sed -e "s:##{BUILD_CFGDIR}##:/etc/vmware/hostd/:g" \
480 + -e "s:##{CFGALTDIR}##:/etc/vmware/hostd/:g" \
481 + -e "s:##{CFGDIR}##:/etc/vmware/:g" \
482 + -e "s:##{ENABLE_AUTH}##:true:g" \
483 + -e "s:##{HOSTDMODE}##:ws:g" \
484 + -e "s:##{HOSTD_CFGDIR}##:/etc/vmware/hostd/:g" \
485 + -e "s:##{HOSTD_MOCKUP}##:false:g" \
486 + -e "s:##{LIBDIR}##:${VM_INSTALL_DIR}/lib/vmware:g" \
487 + -e "s:##{LIBDIR_INSTALLED}##:${VM_INSTALL_DIR}/lib/vmware/:g" \
488 + -e "s:##{LOGDIR}##:/var/log/vmware/:g" \
489 + -e "s:##{LOGLEVEL}##:verbose:g" \
490 + -e "s:##{MOCKUP}##:mockup-host-config.xml:g" \
491 + -e "s:##{PLUGINDIR}##:./:g" \
492 + -e "s:##{SHLIB_PREFIX}##:lib:g" \
493 + -e "s:##{SHLIB_SUFFIX}##:.so:g" \
494 + -e "s:##{USE_BLKLISTSVC}##:false:g" \
495 + -e "s:##{USE_CBRCSVC}##:false:g" \
496 + -e "s:##{USE_CIMSVC}##:false:g" \
497 + -e "s:##{USE_DIRECTORYSVC}##:false:g" \
498 + -e "s:##{USE_DIRECTORYSVC_MOCKUP}##:false:g" \
499 + -e "s:##{USE_DYNAMIC_PLUGIN_LOADING}##:false:g" \
500 + -e "s:##{USE_DYNAMO}##:false:g" \
501 + -e "s:##{USE_DYNSVC}##:false:g" \
502 + -e "s:##{USE_GUESTSVC}##:false:g" \
503 + -e "s:##{USE_HBRSVC}##:false:g" \
504 + -e "s:##{USE_HBRSVC_MOCKUP}##:false:g" \
505 + -e "s:##{USE_HOSTSVC_MOCKUP}##:false:g" \
506 + -e "s:##{USE_HTTPNFCSVC}##:false:g" \
507 + -e "s:##{USE_HTTPNFCSVC_MOCKUP}##:false:g" \
508 + -e "s:##{USE_LICENSESVC_MOCKUP}##:false:g" \
509 + -e "s:##{USE_NFCSVC}##:true:g" \
510 + -e "s:##{USE_NFCSVC_MOCKUP}##:false:g" \
511 + -e "s:##{USE_OVFMGRSVC}##:true:g" \
512 + -e "s:##{USE_PARTITIONSVC}##:false:g" \
513 + -e "s:##{USE_SECURESOAP}##:false:g" \
514 + -e "s:##{USE_SNMPSVC}##:false:g" \
515 + -e "s:##{USE_SOLO_MOCKUP}##:false:g" \
516 + -e "s:##{USE_STATSSVC_MOCKUP}##:false:g" \
517 + -e "s:##{USE_VCSVC_MOCKUP}##:false:g" \
518 + -e "s:##{USE_VDISKSVC}##:false:g" \
519 + -e "s:##{USE_VDISKSVC_MOCKUP}##:false:g" \
520 + -e "s:##{USE_VMSVC_MOCKUP}##:false:g" \
521 + -e "s:##{VM_INVENTORY}##:vmInventory.xml:g" \
522 + -e "s:##{VM_RESOURCES}##:vmResources.xml:g" \
523 + -e "s:##{WEBSERVER_PORT_ENTRY}##::g" \
524 + -e "s:##{WORKINGDIR}##:./:g" \
525 + -i "${D}/etc/vmware/hostd/config.xml" || die
526 +
527 + sed -e "s:##{ENV_LOCATION}##:/etc/vmware/hostd/env/:g" \
528 + -i "${D}/etc/vmware/hostd/environments.xml" || die
529 +
530 + # @@VICLIENT_URL@@=XXX
531 + sed -e "s:@@AUTHD_PORT@@:902:g" \
532 + -i "${D}${VM_INSTALL_DIR}/lib/vmware/hostd/docroot/client/clients.xml" || die
533 + fi
534 +
535 + # install systemd unit files
536 + systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target}
537 +
538 + readme.gentoo_create_doc
539 +}
540 +
541 +pkg_config() {
542 + "${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new
543 +}
544 +
545 +pkg_preinst() {
546 + gnome2_icon_savelist
547 +}
548 +
549 +pkg_postinst() {
550 + fdo-mime_desktop_database_update
551 + gnome2_icon_cache_update
552 + readme.gentoo_pkg_postinst
553 +}
554 +
555 +pkg_prerm() {
556 + einfo "Stopping ${PN} for safe unmerge"
557 + /etc/init.d/vmware stop
558 +}
559 +
560 +pkg_postrm() {
561 + fdo-mime_desktop_database_update
562 + gnome2_icon_cache_update
563 +}