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