Magellan Linux

Contents of /trunk/extras/vmware-workstation/vmware-workstation-6.0.4.93057-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 7047 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/vmware-workstation/vmware-workstation-6.0.4.93057-r3.smage2,v 1.1 2008/07/12 12:19:27 niro Exp $
2
3 PNAME="vmware-workstation"
4 PVER="6.0.4.93057"
5 PBUILD="r3"
6
7 PCATEGORIE="app-emulation"
8 STATE="unstable"
9
10 DESCRIPTION="VMWare-Workstation, a powerful PC Emulation software."
11 HOMEPAGE="http://vmware.com/products/ws/"
12
13 DEPEND=">= virtual/glibc
14 >= x11-libs/libXrandr-1
15 >= x11-libs/libXcursor-1
16 >= x11-libs/libXinerama-1
17 >= x11-libs/libXi-1
18 >= dev-cpp/libsexymm-0.1.9
19 >= dev-lang/perl-5
20 >= virtual/kernel-sources
21 >= sys-apps/pciutils-2.1.11"
22
23 # fetch it at http://download3.vmware.com/software/wkst/
24 SRCFILE_x86="VMware-workstation-${PVER:0:5}-${PVER##*.}.i386.tar.gz"
25 SRCFILE_x86_64="VMware-workstation-${PVER:0:5}-${PVER##*.}.x86_64.tar.gz"
26 SRCFILE="$(eval echo \$SRCFILE_${ARCH/i*86/x86})"
27 SRCDIR="${BUILDDIR}/vmware-distrib"
28
29 # fetch'em at http://ftp.cvut.cz/vmware/
30 # be aware that these any-any drivers are an unoffical update
31 # this patchset is based on the orig 6.0.4 drivers with some 2.6.25 patches applied
32 # see: http://bbs.archlinux.org/viewtopic.php?id=47704
33 # !! replace this tarball with an official one as soon as available!!
34 DRIVERS_VER=118-unofficial
35 DRIVERS_DIR="vmware-any-any-update${DRIVERS_VER}"
36 DRIVERS_TAR="${DRIVERS_DIR}.tar.gz"
37
38 sminclude mtools
39
40 SRC_URI=(
41 http://download3.vmware.com/software/wkst/${SRCFILE_x86}
42 http://download3.vmware.com/software/wkst/${SRCFILE_x86_64}
43 mirror://${PNAME}/${SRCFILE_x86}
44 mirror://${PNAME}/${SRCFILE_x86_64}
45 mirror://${PNAME}/vmware.rc6
46 mirror://${PNAME}/vmware.envd
47 )
48
49 # only fetch update if DRIVERS_VER is given
50 if [[ ! -z ${DRIVERS_VER} ]]
51 then
52 SRC_URI=( ${SRC_URI[*]}
53 mirror://${PNAME}/${DRIVERS_TAR}
54 )
55 fi
56
57 src_prepare()
58 {
59 munpack ${SRCFILE} || die
60 cd ${SRCDIR}
61
62 # only run update if DRIVERS_VER is given!
63 if [[ ! -z ${DRIVERS_VER} ]]
64 then
65 # install updated kernel modules
66 munpack ${DRIVERS_TAR} ${SRCDIR} || die
67
68 mv -f ${DRIVERS_DIR}/*.tar ${SRCDIR}/lib/modules/source/ || die
69
70 cd ${SRCDIR}/${DRIVERS_DIR}
71 chmod 0755 ./update || die
72 chmod 0755 ../lib/bin/vmware || die
73 chmod 0755 ../bin/vmnet-bridge || die
74 chmod 0755 ../lib/bin/vmware-vmx || die
75 chmod 0755 ../lib/bin-debug/vmware-vmx || die
76
77 # vmware any93 doesn't patch anything
78 #./update vmware ../lib/bin/vmware || die
79 #./update bridge ../bin/vmnet-bridge || die
80 #./update vmx ../lib/bin/vmware-vmx || die
81 #./update vmxdebug ../lib/bin-debug/vmware-vmx || die
82 fi
83 }
84
85 src_install()
86 {
87 cd ${SRCDIR}
88
89 # needed directories
90 minstalldir /etc/udev/rules.d || die
91 minstalldir /usr/bin || die
92 minstalldir /opt/vmware || die
93
94 # This is to fix a problem where if someone merges vmware and then
95 # before configuring vmware they upgrade or re-merge the vmware
96 # package which would rmdir the /etc/vmware/init.d/rc?.d directories.
97 mkeepdir /etc/vmware/init.d/rc0.d || die
98 mkeepdir /etc/vmware/init.d/rc1.d || die
99 mkeepdir /etc/vmware/init.d/rc2.d || die
100 mkeepdir /etc/vmware/init.d/rc3.d || die
101 mkeepdir /etc/vmware/init.d/rc4.d || die
102 mkeepdir /etc/vmware/init.d/rc5.d || die
103 mkeepdir /etc/vmware/init.d/rc6.d || die
104
105 # install all files
106 cp -a bin ${BINDIR}/opt/vmware/ || die
107 cp -dr lib ${BINDIR}/opt/vmware/ || die
108 cp -a sbin ${BINDIR}/opt/vmware/ || die
109
110 # remove precompiled kernel modules (none of them matches our kernels)
111 rm -rf ${BINDIR}/opt/vmware/lib/modules/binary || die
112
113 # needed config files
114 cp -a etc/* ${BINDIR}/etc/vmware/ || die
115 cp -a installer/services.sh ${BINDIR}/etc/vmware/init.d/vmware || die
116
117 # create a symlink to /usr/bin
118 mlink /opt/vmware/bin/vmware /usr/bin/vmware || die
119
120 # install docs and man pages
121 cp -a doc ${BINDIR}/opt/vmware/ || die
122 cp -a man ${BINDIR}/opt/vmware/ || die
123
124 # install missing EULA
125 if [[ ! -f ${BINDIR}/opt/vmware/lib/share/EULA.txt ]]
126 then
127 minstallfile doc/EULA /opt/vmware/lib/share/EULA.txt || die
128 fi
129
130 # vmware enviroment
131 minstallenv vmware.envd 90vmware || die
132
133 # install our initscript
134 minstallrc vmware.rc6 vmware || die
135
136 # udev rules
137 echo 'KERNEL=="vmmon*", MODE=0660' > \
138 ${BINDIR}/etc/udev/rules.d/60-vmware.rules || die
139
140 # fix all permissions
141 sed -i 's/mknod -m 600/mknod -m 0660/' ${BINDIR}/etc/vmware/init.d/vmware || die
142 mchown -R root:root / || die
143 mchmod u+s /opt/vmware/bin/vmware || die
144 mchmod u+s /opt/vmware/bin/vmware-ping || die
145 mchmod u+s /opt/vmware/lib/bin/vmware-vmx || die
146
147 # Questions:
148 echo "Adding answers to /etc/vmware/locations"
149 locations="${BINDIR}/etc/vmware/locations"
150 echo "answer BINDIR /opt/vmware/bin" >> ${locations} || die
151 echo "answer LIBDIR /opt/vmware/lib" >> ${locations} || die
152 echo "answer MANDIR /opt/vmware/man" >> ${locations} || die
153 echo "answer DOCDIR /opt/vmware/doc" >> ${locations} || die
154 echo "answer SBINDIR /opt/vmware/sbin" >> ${locations} || die
155 echo "answer RUN_CONFIGURATOR no" >> ${locations} || die
156 echo "answer INITDIR /etc/vmware/init.d" >> ${locations} || die
157 echo "answer INITSCRIPTSDIR /etc/vmware/init.d" >> ${locations} || die
158 }
159
160 preinstall()
161 {
162 # This must be done after the install to get the mtimes on each file
163 # right. This perl snippet gets the /etc/vmware/locations file code:
164 # perl -e "@a = stat('bin/vmware'); print \$a[9]"
165 # The above perl line and the find line below output the same thing.
166 # I would think the find line is faster to execute.
167 # find /opt/vmware/bin/vmware -printf %T@
168
169 D="${BUILDDIR}/${PKGNAME}/binfiles"
170
171 echo "Generating /etc/vmware/locations file."
172 d=`echo ${D} | wc -c`
173 for x in `find ${D}/opt/vmware ${D}/etc/vmware` ; do
174 x="`echo ${x} | cut -c ${d}-`"
175 if [ -d ${D}/${x} ] ; then
176 echo "directory ${x}" >> ${D}/etc/vmware/locations
177 else
178 echo -n "file ${x}" >> ${D}/etc/vmware/locations
179 if [ "${x}" == "/etc/vmware/locations" ] ; then
180 echo "" >> ${D}/etc/vmware/locations
181 elif [ "${x}" == "/etc/vmware/not_configured" ] ; then
182 echo "" >> ${D}/etc/vmware/locations
183 else
184 echo -n " " >> ${D}/etc/vmware/locations
185 #perl -e "@a = stat('${D}${x}'); print \$a[9]" >> ${D}/etc/vmware/locations
186 #find ${D}${x} -printf %T@ >> ${D}/etc/vmware/locations
187
188 # we are using the .mtime from the package as reference for all files later,
189 # so we must use it here to, to get rid of the not_configured file
190 find ${BUILDDIR}/${PKGNAME}/.mtime -printf %T@ >> ${D}/etc/vmware/locations
191 echo "" >> ${D}/etc/vmware/locations
192 fi
193 fi
194 done
195 }
196
197 postinstall()
198 {
199 # This is to fix the problem where the not_configured file doesn't get
200 # removed when the configuration is run. This doesn't remove the file
201 # It just tells the vmware-config.pl script it can delete it.
202 echo "Updating ${MROOT}/etc/vmware/locations"
203 for x in ${MROOT}/etc/vmware/._cfg????_locations ; do
204 if [ -f $x ] ; then
205 cat $x >> ${MROOT}/etc/vmware/locations
206 rm $x
207 fi
208 done
209
210 echo
211 echo "You need to run /opt/vmware/bin/vmware-config.pl to complete the install."
212 echo
213 echo "For VMware Add-Ons just visit"
214 echo "http://www.vmware.com/download/downloadaddons.html"
215 echo
216 echo "After configuring, type 'vmware' to launch."
217 echo
218 }

Properties

Name Value
svn:keywords Id