diff options
author | Vadim Kuznetsov <vadimk@gentoo.org> | 2009-07-06 17:16:01 +0000 |
---|---|---|
committer | Vadim Kuznetsov <vadimk@gentoo.org> | 2009-07-06 17:16:01 +0000 |
commit | e481bb1692bd590d16b3d5871295a9dd870caf0a (patch) | |
tree | 76ffd6a95005194eb2b553a18c07b0db142ab55c /app-emulation | |
parent | Version bump to 2.26.3. Fix two crashs, closes bug #273884 (diff) | |
download | gentoo-2-e481bb1692bd590d16b3d5871295a9dd870caf0a.tar.gz gentoo-2-e481bb1692bd590d16b3d5871295a9dd870caf0a.tar.bz2 gentoo-2-e481bb1692bd590d16b3d5871295a9dd870caf0a.zip |
Initial ebuild. Fixes bug 263560.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/vmware-vix/ChangeLog | 10 | ||||
-rw-r--r-- | app-emulation/vmware-vix/metadata.xml | 17 | ||||
-rw-r--r-- | app-emulation/vmware-vix/vmware-vix-1.6.2.156745.ebuild | 192 |
3 files changed, 219 insertions, 0 deletions
diff --git a/app-emulation/vmware-vix/ChangeLog b/app-emulation/vmware-vix/ChangeLog new file mode 100644 index 000000000000..b05472c7279b --- /dev/null +++ b/app-emulation/vmware-vix/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for app-emulation/vmware-vix +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-vix/ChangeLog,v 1.1 2009/07/06 17:16:01 vadimk Exp $ + +*vmware-vix-1.6.2.156745 (06 Jul 2009) + + 06 Jul 2009; Vadim Kuznetsov vadimk@gentoo.org + +vmware-vix-1.6.2.156745.ebuild, +metadata.xml: + Initial ebuild. Fixes bug 263560. + diff --git a/app-emulation/vmware-vix/metadata.xml b/app-emulation/vmware-vix/metadata.xml new file mode 100644 index 000000000000..55998501c9a0 --- /dev/null +++ b/app-emulation/vmware-vix/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>vmware</herd> + <maintainer> + <email>vadimk@gentoo.org</email> + </maintainer> + <longdescription> + The VIX API allows you to write programs and scripts that automate + virtual machine operations, as well as the guests within virtual + machines. This API is high-level, easy to use, and practical for both + script writers and application programmers. It runs on both Windows and + Linux and supports management of VMware Server, Workstation, and Virtual + Infrastructure (both ESX and vCenter). Bindings are provided for C, + Perl, and COM (Visual Basic, VBscript, C#). + </longdescription> +</pkgmetadata> diff --git a/app-emulation/vmware-vix/vmware-vix-1.6.2.156745.ebuild b/app-emulation/vmware-vix/vmware-vix-1.6.2.156745.ebuild new file mode 100644 index 000000000000..2a0810acfbc0 --- /dev/null +++ b/app-emulation/vmware-vix/vmware-vix-1.6.2.156745.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-vix/vmware-vix-1.6.2.156745.ebuild,v 1.1 2009/07/06 17:16:01 vadimk 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. + +EAPI="2" + +inherit eutils versionator + +MY_PV=$(replace_version_separator 3 '-' ) +MY_PN="VMware-vix-${MY_PV}" + +DESCRIPTION="VMware VIX for Linux" +HOMEPAGE="http://www.vmware.com/" +SRC_URI=" x86? ( mirror://vmware/software/vmserver/${MY_PN}.i386.tar.gz ) + amd64? ( mirror://vmware/software/vmserver/${MY_PN}.x86_64.tar.gz ) " + +LICENSE="vmware" +IUSE="" +SLOT="0" +KEYWORDS="-* ~x86 ~amd64" +RESTRICT="strip" + +# vmware-server should not use virtual/libc as this is a +# precompiled binary package thats linked to glibc. +DEPEND=">=sys-libs/glibc-2.3.5 + >=dev-lang/perl-5 + sys-apps/pciutils + sys-apps/findutils + x11-misc/shared-mime-info + virtual/os-headers" +RDEPEND="${DEPEND} + dev-libs/libxml2 + dev-libs/glib + dev-libs/openssl + net-misc/curl + sys-libs/zlib + ~app-emulation/vmware-modules-1.0.0.24 + !<app-emulation/vmware-modules-1.0.0.24 + !>=app-emulation/vmware-modules-1.0.0.25 + " + +S=${WORKDIR}/vmware-vix-distrib + + +pkg_setup() { + if use x86; then + MY_P="${MY_PN}.i386" + elif use amd64; then + MY_P="${MY_PN}.x86_64" + fi +} + +src_prepare() { + VMWARE_GROUP=${VMWARE_GROUP:-vmware} + VMWARE_INSTALL_DIR=/opt/${PN//-//} + + shortname="vix" + product="vmware-vix" + config_dir="/etc/vmware-vix" + product_name="VMware VIX API" + + enewgroup ${VMWARE_GROUP} +# EPATCH_SOURCE="${FILESDIR}"/${PV} EPATCH_SUFFIX="patch" epatch + + sed -i -e "s:/sbin/lsmod:/bin/lsmod:" ${S}/installer/services.sh || die "sed of services" +} + +src_install() { + # We won't want any perl scripts from VMware + rm -f *.pl bin/*.pl + + # We loop through our directories and copy everything to our system. + for x in bin lib include + do + if [[ -e "${S}/vmware-vix/${x}" ]] + then + dodir "${VMWARE_INSTALL_DIR}"/${x} + cp -pPR "${S}"/vmware-vix/${x}/* "${D}""${VMWARE_INSTALL_DIR}"/${x} \ + || die "copying ${x}" + fi + done + + # If we have an /etc directory, we copy it. + if [[ -e "${S}/etc" ]] + then + dodir "${config_dir}" + cp -pPR "${S}"/etc/* "${D}""${config_dir}" + fowners root:${VMWARE_GROUP} "${config_dir}" + fperms 770 "${config_dir}" + fi + + # If we have any helper files, we install them. First, we check for an + # init script. + if [[ -e "${FILESDIR}/${PN}.rc" ]] + then + newinitd "${FILESDIR}"/${PN}.rc ${product} || die "newinitd" + fi + + local ENVD="${T}/90${PN}" + echo "PATH=${VMWARE_INSTALL_DIR}/bin" > "${ENVD}" + doenvd "${ENVD}" || die "doenvd" + + # Last, we check for any mime files. + if [[ -e "${FILESDIR}/${PN}.xml" ]] + then + insinto /usr/share/mime/packages + doins "${FILESDIR}"/${PN}.xml || die "mimetypes" + fi + + # Blame bug #91191 for this one. + if [[ -e doc/EULA ]] + then + insinto "${VMWARE_INSTALL_DIR}"/doc + doins doc/EULA || die "copying EULA" + fi + + # Now, we copy in our services.sh file + exeinto "${config_dir}"/init.d + newexe installer/services.sh ${product} || die "services.sh" + + dohtml -r doc/VMwareVix/* + + # Finally, we run the "questions" + # Questions: + einfo "Adding answers to ${config_dir}/locations" + locations="${D}${config_dir}/locations" + echo "answer BINDIR ${VMWARE_INSTALL_DIR}/bin" >> ${locations} + echo "answer LIBDIR ${VMWARE_INSTALL_DIR}/lib" >> ${locations} + echo "answer VIXLIBDIR ${VMWARE_INSTALL_DIR}/lib" >> ${locations} + #echo "answer MANDIR ${VMWARE_INSTALL_DIR}/man" >> ${locations} + echo "answer DOCDIR /usr/share/doc/${P}" >> ${locations} + +} + +pkg_preinst() { + # This must be done after the install to get the mtimes on each file + # right. + + #Note: it's a bit weird to use ${D} in a preinst script but it should work + #(drobbins, 1 Feb 2002) + + einfo "Generating ${config_dir}/locations file." + d=`echo ${D} | wc -c` + for x in `find ${D}${VMWARE_INSTALL_DIR} ${D}${config_dir}` ; do + x="`echo ${x} | cut -c ${d}-`" + if [ -d "${D}/${x}" ] ; then + echo "directory ${x}" >> "${D}${config_dir}"/locations + else + echo -n "file ${x}" >> "${D}${config_dir}"/locations + if [ "${x}" == "${config_dir}/locations" ] ; then + echo "" >> "${D}${config_dir}"/locations + elif [ "${x}" == "${config_dir}/not_configured" ] ; then + echo "" >> "${D}${config_dir}"/locations + else + echo -n " " >> "${D}${config_dir}"/locations + find ${D}${x} -printf %T@ >> "${D}${config_dir}"/locations + echo "" >> "${D}${config_dir}"/locations + fi + fi + done +} + +pkg_postinst() { + update-mime-database /usr/share/mime + [[ -d "${config_dir}" ]] && chown -R root:${VMWARE_GROUP} ${config_dir} + + # This is to fix the problem where the not_configured file doesn't get + # removed when the configuration is run. This doesn't remove the file + # It just tells the vmware-config.pl script it can delete it. + einfo "Updating ${config_dir}/locations" + for x in "${config_dir}"/._cfg????_locations ; do + if [ -f $x ] ; then + cat $x >> "${config_dir}"/locations + rm $x + fi + done + + ewarn "In order to run ${product_name}, you have to" + ewarn "be in the '${VMWARE_GROUP}' group." +} + +pkg_postrm() { + if ! has_version app-emulation/${PN}; then + ewarn "To remove all traces of ${producti_name} you will need to remove the files" + ewarn "in ${config_dir} and /etc/init.d/${product}." + ewarn "If the vmware-modules package is installed, you may no longer need it." + fi +} |