add workstation support

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1271 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2009-05-30 15:40:39 +00:00
parent 47df4fb05b
commit 05c52b0dae

View File

@ -16,7 +16,7 @@ esac
inherit pax-utils eutils
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_setup src_prepare src_install src_unpack pkg_postrm
EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_setup src_prepare src_install src_unpack pkg_postrm pkg_nofetch
vmware-1_determine_product() {
# Set the product category, and the category options
@ -30,10 +30,6 @@ vmware-1_determine_product() {
product="vmware-console"
config_program="vmware-config-console.pl"
;;
workstation-tools|esx-tools|gsx-tools|server-tools)
product="vmware-tools"
config_program="vmware-config-tools.pl"
;;
*)
product="unknown"
;;
@ -44,6 +40,9 @@ vmware-1_determine_product() {
case "${shortname}" in
workstation)
FULL_NAME="Workstation"
SRC_URI="mirror://vmware/software/wkst/${VM_SRC}"
RESTRICT="${RESTRICT} fetch mirror"
HOMEPAGE="http://www.vmware.com/download/ws/"
;;
player)
FULL_NAME="Player"
@ -55,6 +54,7 @@ vmware-1_determine_product() {
server)
FULL_NAME="Server"
SRC_URI="mirror://vmware/software/vmserver/${VM_SRC}"
HOMEPAGE="http://www.vmware.com/download/server/"
;;
server-console)
FULL_NAME="Server Console"
@ -69,18 +69,22 @@ vmware-1_determine_product() {
DEPEND="x11-misc/shared-mime-info"
DESCRIPTION="VMware ${FULL_NAME} for Linux"
HOMEPAGE="http://www.vmware.com/"
LICENSE="vmware"
IUSE=""
RESTRICT="strip"
#if [ -z "${VM_SRC}" ] && die "Buggy ebuild plz define VM_SRC"
vmware-1_determine_product
for a in ${VM_SRC_EXTRA}
do
#if [ -n "${VM_SRC_EXTRA}" ]
#then
for a in ${VM_SRC_EXTRA}
do
SRC_URI="${SRC_URI} http://ftp.mars.arge.at/vmware/${P/_p/-}-${a}.tar.bz2"
done
done
#fi
export VMWARE_GROUP=${VMWARE_GROUP:-vmware}
export VMWARE_INSTALL_DIR=/opt/${PN//-//}
@ -94,7 +98,6 @@ vmware-1_create_initd() {
}
vmware-1_run_questions() {
[ -z "${product}" ] && vmware-1_determine_product
# Questions:
einfo "Adding answers to ${config_dir}/locations"
locations="${D}${config_dir}/locations"
@ -102,7 +105,7 @@ vmware-1_run_questions() {
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" ]
if [ "${product}" == "vmware" ]
then
echo "answer SBINDIR ${VMWARE_INSTALL_DIR}/sbin" >> ${locations}
echo "answer RUN_CONFIGURATOR no" >> ${locations}
@ -117,25 +120,7 @@ vmware-1_pkg_setup() {
}
vmware-1_src_unpack() {
[ -z "${product}" ] && vmware-1_determine_product
case "${product}" in
vmware-tools)
# We grab our tarball from "CD"
einfo "You will need ${TARBALL} from the VMware installation."
einfo "Select VM->Install VMware Tools from VMware's menu."
cdrom_get_cds ${TARBALL}
;;
esac
# If there is anything to unpack, at all, then we should be using MY_P.
if [[ -n "${MY_P}" ]]
then
if [[ -e "${CDROM_ROOT}"/${MY_P}.tar.gz ]]
then
tar xzf "${CDROM_ROOT}"/${MY_P}.tar.gz
else
unpack "${MY_P}".tar.gz
fi
fi
unpack ${VM_SRC}
for a in ${VM_SRC_EXTRA}
do
unpack ${P/_p/-}-${a}.tar.bz2
@ -203,21 +188,6 @@ vmware-1_src_install() {
fi
cd "${S}"
# We remove the shipped libssl for bug #148682
if [ -d "${S}"/libssl.so.0.9.7 ]
then
rm -rf "${S}"/lib/lib/libssl.so.0.9.7
# Now, we move in our own
cp -pPR "${S}"/libssl.so.0.9.7 "${S}"/lib/lib
fi
# We remove the shipped libcrypto for bug #148682
if [ -d "${S}"/libcrypto.so.0.9.7 ]
then
rm -rf "${S}"/lib/lib/libcrypto.so.0.9.7
# Now, we move in our own
cp -pPR "${S}"/libcrypto.so.0.9.7 "${S}"/lib/lib
fi
# We loop through our directories and copy everything to our system.
for x in bin lib sbin
do
@ -290,7 +260,7 @@ vmware-1_src_install() {
# Everything after this point will hopefully go away once we can rid
# ourselves of the evil perl configuration scripts.
if [ "${product}" == "vmware" -o "${product}" == "vmware-tools" ]
if [ "${product}" == "vmware" ]
then
# We have to create a bunch of rc directories for the init script
@ -372,7 +342,7 @@ vmware-1_pkg_postinst() {
elog "After configuring, run ${PN} to launch"
fi
echo
if [ "${product}" == "vmware" -o "${product}" == "vmware-tools" ]
if [ "${product}" == "vmware" ]
then
elog "Also note that when you reboot you should run:"
elog " /etc/init.d/${product} start"
@ -404,3 +374,12 @@ vmware-1_pkg_postrm() {
echo
fi
}
vmware-1_pkg_nofetch() {
einfo "This files require you to register at www.vmware.com"
einfo "Please download following file:"
einfo " - ${VM_SRC}"
einfo "from ${HOMEPAGE}"
einfo "and place it in ${DISTDIR}"
}