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