update perl based vmware eclass
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1267 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
3b3636d70a
commit
575a13368a
@ -2,6 +2,13 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: $
|
# $Header: $
|
||||||
|
|
||||||
|
# By default this eclasses wants eapi 2 which might be redefinable to newer
|
||||||
|
# versions.
|
||||||
|
case ${EAPI:-0} in
|
||||||
|
2) : ;;
|
||||||
|
*) die "No way! EAPI other than 2 is not supported for now." ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# This eclass is for all vmware-1-* ebuilds in the tree and should contain all
|
# This eclass is for all vmware-1-* ebuilds in the tree and should contain all
|
||||||
# of the common components across the multiple packages.
|
# of the common components across the multiple packages.
|
||||||
|
|
||||||
@ -9,40 +16,7 @@
|
|||||||
|
|
||||||
inherit pax-utils eutils
|
inherit pax-utils eutils
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_setup src_install src_unpack pkg_postrm
|
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_setup src_prepare src_install src_unpack pkg_postrm
|
||||||
|
|
||||||
DEPEND="x11-misc/shared-mime-info"
|
|
||||||
|
|
||||||
export ANY_ANY="vmware-any-any-update115"
|
|
||||||
#export TOOLS_ANY="vmware-tools-any-update1"
|
|
||||||
export VMWARE_GROUP=${VMWARE_GROUP:-vmware}
|
|
||||||
export VMWARE_INSTALL_DIR=/opt/${PN//-//}
|
|
||||||
|
|
||||||
vmware-1_create_initd() {
|
|
||||||
dodir "${config_dir}"/init.d/rc{0,1,2,3,4,5,6}.d
|
|
||||||
# This is to fix a problem where if someone merges vmware and then
|
|
||||||
# before configuring vmware they upgrade or re-merge the vmware
|
|
||||||
# package which would rmdir the /etc/vmware/init.d/rc?.d directories.
|
|
||||||
keepdir "${config_dir}"/init.d/rc{0,1,2,3,4,5,6}.d
|
|
||||||
}
|
|
||||||
|
|
||||||
vmware-1_run_questions() {
|
|
||||||
vmware-1_determine_product
|
|
||||||
# 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 MANDIR ${VMWARE_INSTALL_DIR}/man" >> ${locations}
|
|
||||||
echo "answer DOCDIR ${VMWARE_INSTALL_DIR}/doc" >> ${locations}
|
|
||||||
if [ "${product}" == "vmware" -o "${product}" == "vmware-tools" ]
|
|
||||||
then
|
|
||||||
echo "answer SBINDIR ${VMWARE_INSTALL_DIR}/sbin" >> ${locations}
|
|
||||||
echo "answer RUN_CONFIGURATOR no" >> ${locations}
|
|
||||||
echo "answer INITDIR ${config_dir}/init.d" >> ${locations}
|
|
||||||
echo "answer INITSCRIPTSDIR ${config_dir}/init.d" >> ${locations}
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
vmware-1_determine_product() {
|
vmware-1_determine_product() {
|
||||||
# Set the product category, and the category options
|
# Set the product category, and the category options
|
||||||
@ -80,6 +54,7 @@ vmware-1_determine_product() {
|
|||||||
;;
|
;;
|
||||||
server)
|
server)
|
||||||
FULL_NAME="Server"
|
FULL_NAME="Server"
|
||||||
|
SRC_URI="mirror://vmware/software/vmserver/${VM_SRC}"
|
||||||
;;
|
;;
|
||||||
server-console)
|
server-console)
|
||||||
FULL_NAME="Server Console"
|
FULL_NAME="Server Console"
|
||||||
@ -92,12 +67,57 @@ vmware-1_determine_product() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEPEND="x11-misc/shared-mime-info"
|
||||||
|
DESCRIPTION="VMware ${FULL_NAME} for Linux"
|
||||||
|
HOMEPAGE="http://www.vmware.com/"
|
||||||
|
|
||||||
|
LICENSE="vmware"
|
||||||
|
IUSE=""
|
||||||
|
RESTRICT="strip"
|
||||||
|
|
||||||
|
vmware-1_determine_product
|
||||||
|
|
||||||
|
for a in ${VM_SRC_EXTRA}
|
||||||
|
do
|
||||||
|
SRC_URI="${SRC_URI} http://ftp.mars.arge.at/vmware/${P/_p/-}-${a}.tar.bz2"
|
||||||
|
done
|
||||||
|
|
||||||
|
export VMWARE_GROUP=${VMWARE_GROUP:-vmware}
|
||||||
|
export VMWARE_INSTALL_DIR=/opt/${PN//-//}
|
||||||
|
|
||||||
|
vmware-1_create_initd() {
|
||||||
|
dodir "${config_dir}"/init.d/rc{0,1,2,3,4,5,6}.d
|
||||||
|
# This is to fix a problem where if someone merges vmware and then
|
||||||
|
# before configuring vmware they upgrade or re-merge the vmware
|
||||||
|
# package which would rmdir the /etc/vmware/init.d/rc?.d directories.
|
||||||
|
keepdir "${config_dir}"/init.d/rc{0,1,2,3,4,5,6}.d
|
||||||
|
}
|
||||||
|
|
||||||
|
vmware-1_run_questions() {
|
||||||
|
[ -z "${product}" ] && vmware-1_determine_product
|
||||||
|
# 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 MANDIR ${VMWARE_INSTALL_DIR}/man" >> ${locations}
|
||||||
|
echo "answer DOCDIR ${VMWARE_INSTALL_DIR}/doc" >> ${locations}
|
||||||
|
if [ "${product}" == "vmware" -o "${product}" == "vmware-tools" ]
|
||||||
|
then
|
||||||
|
echo "answer SBINDIR ${VMWARE_INSTALL_DIR}/sbin" >> ${locations}
|
||||||
|
echo "answer RUN_CONFIGURATOR no" >> ${locations}
|
||||||
|
echo "answer INITDIR ${config_dir}/init.d" >> ${locations}
|
||||||
|
echo "answer INITSCRIPTSDIR ${config_dir}/init.d" >> ${locations}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
vmware-1_pkg_setup() {
|
vmware-1_pkg_setup() {
|
||||||
vmware-1_determine_product
|
[ -z "${product}" ] && vmware-1_determine_product
|
||||||
}
|
}
|
||||||
|
|
||||||
vmware-1_src_unpack() {
|
vmware-1_src_unpack() {
|
||||||
vmware-1_determine_product
|
[ -z "${product}" ] && vmware-1_determine_product
|
||||||
case "${product}" in
|
case "${product}" in
|
||||||
vmware-tools)
|
vmware-tools)
|
||||||
# We grab our tarball from "CD"
|
# We grab our tarball from "CD"
|
||||||
@ -115,66 +135,36 @@ vmware-1_src_unpack() {
|
|||||||
else
|
else
|
||||||
unpack "${MY_P}".tar.gz
|
unpack "${MY_P}".tar.gz
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
for a in ${VM_SRC_EXTRA}
|
||||||
|
do
|
||||||
|
unpack ${P/_p/-}-${a}.tar.bz2
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
if [[ -n "${ANY_ANY}" ]]
|
vmware-1_src_prepare() {
|
||||||
then
|
[[ -e lib/bin/vmware ]] && \
|
||||||
unpack "${ANY_ANY}".tar.gz
|
chmod 755 lib/bin/vmware
|
||||||
# Move the relevant ANY_ANY files now, so that they can be patched later...
|
[[ -e bin/vmnet-bridge ]] && \
|
||||||
mv -f "${ANY_ANY}"/services.sh "${S}"/installer/services.sh
|
chmod 755 bin/vmnet-bridge
|
||||||
# We should be able to get rid of this eventually,
|
[[ -e lib/bin/vmware-vmx ]] && \
|
||||||
# since we'll be using vmware-modules in future...
|
chmod 755 lib/bin/vmware-vmx
|
||||||
[[ "${product}" == "vmware" ]] && \
|
[[ -e lib/bin-debug/vmware-vmx ]] && \
|
||||||
mv -f "${ANY_ANY}"/*.tar "${S}"/lib/modules/source
|
chmod 755 lib/bin-debug/vmware-vmx
|
||||||
[[ -e lib/bin/vmware ]] && \
|
|
||||||
chmod 755 lib/bin/vmware
|
|
||||||
[[ -e bin/vmnet-bridge ]] && \
|
|
||||||
chmod 755 bin/vmnet-bridge
|
|
||||||
[[ -e lib/bin/vmware-vmx ]] && \
|
|
||||||
chmod 755 lib/bin/vmware-vmx
|
|
||||||
[[ -e lib/bin-debug/vmware-vmx ]] && \
|
|
||||||
chmod 755 lib/bin-debug/vmware-vmx
|
|
||||||
if [[ "${RUN_UPDATE}" == "yes" ]]
|
|
||||||
then
|
|
||||||
cd "${S}"/"${ANY_ANY}"
|
|
||||||
./update vmware ../lib/bin/vmware || die
|
|
||||||
./update bridge ../bin/vmnet-bridge || die
|
|
||||||
./update vmx ../lib/bin/vmware-vmx || die
|
|
||||||
./update vmxdebug ../lib/bin-debug/vmware-vmx || die
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove PAX MPROTECT flag from all applicable files in /bin, /sbin for
|
# Remove PAX MPROTECT flag from all applicable files in /bin, /sbin for
|
||||||
# the vmware package only (since modules, tools and console should not
|
# the vmware package only (since modules, tools and console should not
|
||||||
# need to generate code on the fly in memory).
|
# need to generate code on the fly in memory).
|
||||||
[[ "${product}" == "vmware" ]] && pax-mark -m \
|
[[ "${product}" == "vmware" ]] && pax-mark -m \
|
||||||
$(list-paxables ${S}/{bin{,-debug},sbin}/{vmware-serverd,vmware-vmx})
|
$(list-paxables ${S}/{bin{,-debug},sbin}/{vmware-serverd,vmware-vmx})
|
||||||
|
|
||||||
# Run through any patches that might need to be applied
|
# Run through any patches that might need to be applied
|
||||||
cd "${S}"
|
cd "${S}"
|
||||||
if [[ -d "${FILESDIR}/${PV}" ]]
|
if [[ -d "${WORKDIR}/patches" ]]
|
||||||
then
|
then
|
||||||
EPATCH_SUFFIX="patch"
|
EPATCH_FORCE="yes"
|
||||||
epatch "${FILESDIR}"/${PV}
|
EPATCH_SUFFIX="patch"
|
||||||
fi
|
epatch "${WORKDIR}"/patches
|
||||||
if [[ -n "${PATCHES}" ]]
|
|
||||||
then
|
|
||||||
for patch in ${PATCHES}
|
|
||||||
do
|
|
||||||
epatch "${FILESDIR}"/${patch}
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
# Unpack our new libs
|
|
||||||
for a in ${A}
|
|
||||||
do
|
|
||||||
case ${a} in
|
|
||||||
vmware-libssl.so.0.9.7l.tar.bz2)
|
|
||||||
unpack vmware-libssl.so.0.9.7l.tar.bz2
|
|
||||||
;;
|
|
||||||
vmware-libcrypto.so.0.9.7l.tar.bz2)
|
|
||||||
unpack vmware-libcrypto.so.0.9.7l.tar.bz2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user