app-emulation/vmware-player: initial checkin based on new eclass

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1276 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2009-05-30 16:28:50 +00:00
parent c2329f5941
commit f25353d20f
7 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
PATH=/opt/vmware/player/bin
ROOTPATH=/opt/vmware/player/bin
MANPATH=/opt/vmware/player/man

View File

@@ -0,0 +1,86 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-player/files/vmware-player.rc,v 1.5 2008/04/26 17:36:10 ikelos Exp $
depend() {
need localmount
use logger net hald
after samba
}
vmware_prettify() {
# Yea, the code is ugly but the output is pretty
state=$1
waserror=0
msgtype=0
while read line
do
[ "${line}" = "" ] && continue
if [ ${msgtype} -le 0 ]
then
if [ ${msgtype} -eq -1 ]
then
ewarn ${line}
continue
fi
case ${line} in
*:*)
einfon ${line}
echo
eend 0
msgtype=1;;
*)
ewarn ${line}
msgtype=-1
waserror=1;;
esac
continue
fi
# Strip out anything after the <esc> code
message=`echo ${line} | sed -e "s/^\(.*\).*$/\1/"`
einfon " ${message}"
echo
echo ${line} | grep -q done
status=$?
eend ${status}
if [ ${status} -eq 0 ]
then
logger -p local0.err -t vmware-${state} "${line}"
waserror=${status}
fi
done
if [ "${msgtype}" = "-1" ]
then
eend 1 "VMware is not properly configured! See above."
fi
return ${waserror}
}
start() {
test -x /etc/vmware/init.d/vmware || \
eend 1 "vmware init script not found. Aborting" || return 1
if modinfo vmblock > /dev/null 2>&1;
then
ebegin "Loading vmblock for drag and drop support"
local result
modprobe vmblock || eend 1 "Failed to load vmblock driver"
test ! -e /tmp/VMwareDnD && mkdir /tmp/VMwareDnD
chmod 1777 /tmp/VMwareDnD
mount -t vmblock none /proc/fs/vmblock/mountPoint || eend 1 "Failed to mount the vmblock filesystem"
eend 0
fi
/etc/vmware/init.d/vmware start | vmware_prettify start
return $?
}
stop() {
umount /proc/fs/vmblock/mountPoint > /dev/null 2>&1
/etc/vmware/init.d/vmware stop | vmware_prettify stop
return $?
}

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-vmware-vm">
<comment xml:lang="en">VMware virtual machine</comment>
<magic priority="50">
<match type="string" value='config.version = "' offset="0:4096"/>
</magic>
<glob pattern="*.vmx"/>
</mime-type>
<mime-type type="application/x-vmware-vmdisk">
<comment xml:lang="en">VMware virtual disk</comment>
<magic priority="50">
<match type="string" value="# Disk DescriptorFile" offset="0"/>
<match type="string" value="KDMV" offset="0"/>
</magic>
<glob pattern="*.vmdk"/>
</mime-type>
<mime-type type="application/x-vmware-team">
<comment xml:lang="en">VMware team</comment>
<magic priority="50">
<match type="string" value='&lt;Foundry version="1"&gt;' offset="0">
<match type="string" value="&lt;VMTeam&gt;" offset="23:24"/>
</match>
</magic>
<glob pattern="*.vmtm"/>
</mime-type>
<mime-type type="application/x-vmware-snapshot">
<comment xml:lang="en">VMware virtual machine snapshot</comment>
<magic priority="50">
<match type="string" value="\\0xD0\\0xBE\\0xD0\\0xBE" offset="0"/>
</magic>
<glob pattern="*.vmsn"/>
</mime-type>
<mime-type type="application/x-vmware-vmfoundry">
<comment xml:lang="en">VMware virtual machine foundry</comment>
<magic priority="50">
<match type="string" value='&lt;Foundry version="1"&gt;' offset="0">
<match type="string" value="&lt;VM&gt;" offset="23:24"/>
</match>
</magic>
<glob pattern="*.vmxf"/>
</mime-type>
</mime-info>