vmware-workstation-11.1.3.3206955-r4.ebuild 15 KB

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