]> git.pld-linux.org Git - packages/VMware-workstation.git/blob - VMware-workstation.spec
19247c99a7735a20d3ef81dd4a1ae0c5eac40738
[packages/VMware-workstation.git] / VMware-workstation.spec
1 #
2 # TODO:
3 #       - Dependencies
4 #
5 # Conditional build:
6 %bcond_with     internal_libs   # internal libs stuff
7 %bcond_without  dist_kernel     # without distribution kernel
8 %bcond_without  smp             # without SMP kernel modules
9 #
10 %include        /usr/lib/rpm/macros.perl
11
12 %define         _ver    4.5.1
13 %define         _build  7568
14 %define         _rel    1
15 %define         _urel   68
16
17 Summary:        VMware Workstation
18 Summary(pl):    VMware Workstation - wirtualna platforma dla stacji roboczej
19 Name:           VMware-workstation
20 Version:        %{_ver}.%{_build}
21 Release:        %{_rel}
22 License:        custom, non-distributable
23 Group:          Applications/Emulators
24 Source0:        http://download3.vmware.com/software/wkst/%{name}-%{_ver}-%{_build}.tar.gz
25 Source1:        http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update%{_urel}.tar.gz
26 # Source1-md5:  89b66ff79e6439945de11dfa9062b17d
27 Source2:        %{name}.init
28 Source3:        %{name}-vmnet.conf
29 Patch0:         %{name}-Makefile.patch
30 Patch1:         %{name}-compat.patch
31 Patch2:         %{name}-run_script.patch
32 NoSource:       0
33 URL:            http://www.vmware.com/
34 BuildRequires:  gcc-c++
35 BuildRequires:  rpm-perlprov
36 BuildRequires:  rpmbuild(macros) >= 1.118
37 BuildRequires:  %{kgcc_package}
38 Requires:       kernel(vmmon) = %{version}-%{_rel}
39 %{?with_dist_kernel:BuildRequires:      kernel-module-build}
40 %{?with_dist_kernel:BuildRequires:      kernel-doc}
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _noautoprovfiles %{_libdir}/vmware/lib/.*\.so.*
44
45 %description
46 VMware Workstation Virtual Platform is a thin software layer that
47 allows multiple guest operating systems to run concurrently on a
48 single standard PC, without repartitioning or rebooting, and without
49 significant loss of performance.
50
51 %description -l pl
52 VMware Workstation Virtual Platform to cienka warstwa oprogramowania
53 pozwalaj±ca na jednoczesne dzia³anie wielu go¶cinnych systemów
54 operacyjnych na jednym zwyk³ym PC, bez repartycjonowania ani
55 rebootowania, bez znacznej utraty wydajno¶ci.
56
57 %package debug
58 Summary:        TODO
59 Summary(pl):    TODO
60 Group:          Applications/Emulators
61 Requires:       %{name} = %{version}-%{release}
62
63 %description debug
64 TODO.
65
66 %description debug -l pl
67 TODO.
68
69 %package help
70 Summary:        VMware Workstation help files
71 Summary(pl):    Pliki pomocy dla VMware Workstation
72 Group:          Applications/Emulators
73 Requires:       %{name} = %{version}-%{release}
74 Requires:       mozilla
75
76 %description help
77 VMware Workstation help files.
78
79 %description help -l pl
80 Pliki pomocy dla VMware Workstation.
81
82 %package networking
83 Summary:        TODO
84 Summary(pl):    TODO
85 Group:          Applications/Emulators
86 Requires:       %{name} = %{version}-%{release}
87 Requires:       kernel(vmnet) = %{version}-%{_rel}
88
89 %description networking
90 TODO.
91
92 %description networking -l pl
93 TODO.
94
95 %package samba
96 Summary:        TODO
97 Summary(pl):    TODO
98 Group:          Applications/Emulators
99 Requires:       %{name} = %{version}-%{release}
100
101 %description samba
102 TODO.
103
104 %description samba -l pl
105 TODO.
106
107 %package -n kernel-misc-vmmon
108 Summary:        Kernel module for VMware Workstation
109 Summary(pl):    Modu³ j±dra dla VMware Workstation
110 Release:        %{_rel}@%{_kernel_ver_str}
111 Group:          Base/Kernel
112 Provides:       kernel(vmmon) = %{version}-%{_rel}
113 Requires:       dev >= 2.9.0-7
114 Requires(post,postun):  /sbin/depmod
115 %{?with_dist_kernel:%requires_releq_kernel_up}
116
117 %description -n kernel-misc-vmmon
118 Kernel modules for VMware Workstation - vmmon.
119
120 %description -n kernel-misc-vmmon -l pl
121 Modu³y j±dra dla VMware Workstation - vmmon.
122
123 %package -n kernel-misc-vmnet
124 Summary:        Kernel module for VMware Workstation
125 Summary(pl):    Modu³ j±dra dla VMware Workstation
126 Release:        %{_rel}@%{_kernel_ver_str}
127 Group:          Base/Kernel
128 Provides:       kernel(vmnet) = %{version}-%{_rel}
129 Requires:       dev >= 2.9.0-7
130 Requires(post,postun):  /sbin/depmod
131 %{?with_dist_kernel:%requires_releq_kernel_up}
132
133 %description -n kernel-misc-vmnet
134 Kernel modules for VMware Workstation - vmnet.
135
136 %description -n kernel-misc-vmnet -l pl
137 Modu³y j±dra dla VMware Workstation - vmnet.
138
139 %package -n kernel-smp-misc-vmmon
140 Summary:        SMP kernel module for VMware Workstation
141 Summary(pl):    Modu³ j±dra SMP dla VMware Workstation
142 Release:        %{_rel}@%{_kernel_ver_str}
143 Group:          Base/Kernel
144 Provides:       kernel(vmmon) = %{version}-%{_rel}
145 Requires(post,postun):  /sbin/depmod
146 %{?with_dist_kernel:%requires_releq_kernel_smp}
147
148 %description -n kernel-smp-misc-vmmon
149 SMP kernel modules fov VMware Workstation - vmmon-smp.
150
151 %description -n kernel-smp-misc-vmmon -l pl
152 Modu³y j±dra SMP dla VMware Workstation - vmmon-smp.
153
154 %package -n kernel-smp-misc-vmnet
155 Summary:        SMP kernel module for VMware Workstation
156 Summary(pl):    Modu³ j±dra SMP dla VMware Workstation
157 Release:        %{_rel}@%{_kernel_ver_str}
158 Group:          Base/Kernel
159 Provides:       kernel(vmnet) = %{version}-%{_rel}
160 Requires(post,postun):  /sbin/depmod
161 %{?with_dist_kernel:%requires_releq_kernel_smp}
162
163 %description -n kernel-smp-misc-vmnet
164 SMP kernel module for VMware Workstation - vmnet-smp.
165
166 %description -n kernel-smp-misc-vmnet -l pl
167 Modu³y j±dra SMP dla VMware Workstation - vmnet-smp.
168
169 %prep
170 %setup -q -n vmware-distrib
171 %setup -qDT -n vmware-distrib -a1
172 cd vmware-any-any-update%{_urel}
173 tar xf vmmon.tar
174 tar xf vmnet.tar
175 %patch0 -p0
176 %patch1 -p0
177 cd -
178 %patch2 -p1
179
180 %build
181 cd vmware-any-any-update%{_urel}
182 mkdir built
183 cp -a vmmon-only vmmon-only.clean
184 cp -a vmnet-only vmnet-only.clean
185 for mod in vmmon vmnet ; do
186     for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
187         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
188             exit 1
189         fi
190         rm -rf $mod-only
191         cp -a $mod-only.clean $mod-only
192         cd $mod-only
193         install -d include/{linux,config}
194         touch include/config/MARKER
195         ln -sf %{_kernelsrcdir}/config-$cfg .config
196         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
197         ln -sf %{_kernelsrcdir}/include/asm-%{_arch} include/asm
198         %{__make} -C %{_kernelsrcdir} modules \
199             SUBDIRS=$PWD O=$PWD \
200             VM_KBUILD=26
201         mv -f $mod.ko ../built/$mod-$cfg.ko
202         cd -
203     done
204 done
205 cd -
206
207 %install
208 rm -rf $RPM_BUILD_ROOT
209 install -d \
210         $RPM_BUILD_ROOT%{_sysconfdir}/vmware \
211         $RPM_BUILD_ROOT%{_bindir} \
212         $RPM_BUILD_ROOT%{_libdir}/vmware/bin \
213         $RPM_BUILD_ROOT%{_mandir} \
214         $RPM_BUILD_ROOT/etc/rc.d/init.d \
215         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc \
216         $RPM_BUILD_ROOT/var/run/vmware
217
218 cd vmware-any-any-update%{_urel}
219 install built/vmmon-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
220         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmmon.ko
221 install built/vmnet-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
222         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmnet.ko
223 %if %{with smp} && %{with dist_kernel}
224 install built/vmmon-smp.ko \
225         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vmmon.ko
226 install built/vmnet-smp.ko \
227         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vmnet.ko
228 %endif
229 cd -
230
231 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vmnet
232 install %{SOURCE3} $RPM_BUILD_ROOT/etc/vmware/vmnet.conf
233
234 cp      bin/*-* $RPM_BUILD_ROOT%{_bindir}
235
236 cp      lib/bin/vmware $RPM_BUILD_ROOT%{_bindir}
237
238 cp -r   lib/bin/vmware-vmx \
239         $RPM_BUILD_ROOT%{_libdir}/vmware/bin
240
241 cp -r   lib/{bin-debug,config,floppies,help*,isoimages,licenses,messages,smb,xkeymap} \
242         $RPM_BUILD_ROOT%{_libdir}/vmware
243
244 cp -r   man/* $RPM_BUILD_ROOT%{_mandir}
245 gunzip  $RPM_BUILD_ROOT%{_mandir}/man?/*.gz
246
247 cat > $RPM_BUILD_ROOT%{_sysconfdir}/vmware/locations <<EOF
248 VM_BINDIR=%{_bindir}
249 VM_LIBDIR=%{_libdir}/vmware
250 EOF
251
252 %if %{with internal_libs}
253 cp      bin/vmware $RPM_BUILD_ROOT%{_bindir}/vmware.sh
254 cp -r   lib/lib $RPM_BUILD_ROOT%{_libdir}/vmware
255 %endif
256
257 %clean
258 rm -rf $RPM_BUILD_ROOT
259
260 %post networking
261 /sbin/chkconfig --add vmnet
262 if [ -r /var/lock/subsys/vmnet ]; then
263         /etc/rc.d/init.d/vmnet restart >&2
264 else
265         echo "Run \"/etc/rc.d/init.d/vmnet start\" to start VMware networking service."
266 fi
267
268 %preun networking
269 if [ "$1" = "0" ]; then
270         if [ -r /var/lock/subsys/vmnet ]; then
271                 /etc/rc.d/init.d/vmnet stop >&2
272         fi
273         /sbin/chkconfig --del vmnet
274 fi
275
276 %post   -n kernel-misc-vmmon
277 %depmod %{_kernel_ver}
278
279 %postun -n kernel-misc-vmmon
280 %depmod %{_kernel_ver}
281
282 %post   -n kernel-misc-vmnet
283 %depmod %{_kernel_ver}
284
285 %postun -n kernel-misc-vmnet
286 %depmod %{_kernel_ver}
287
288 %post   -n kernel-smp-misc-vmmon
289 %depmod %{_kernel_ver}
290
291 %postun -n kernel-smp-misc-vmmon
292 %depmod %{_kernel_ver}
293
294 %post   -n kernel-smp-misc-vmnet
295 %depmod %{_kernel_ver}
296
297 %postun -n kernel-smp-misc-vmnet
298 %depmod %{_kernel_ver}
299
300 %files
301 %defattr(644,root,root,755)
302 %doc doc/* lib/configurator/vmnet-{dhcpd,nat}.conf
303 %dir %{_sysconfdir}/vmware
304 %{_sysconfdir}/vmware/locations
305 %attr(755,root,root) %{_bindir}/vmware
306 %{?with_internal_libs:%attr(755,root,root) %{_bindir}/vmware.sh}
307 %attr(755,root,root) %{_bindir}/vmware-loop
308 %attr(755,root,root) %{_bindir}/vmware-mount.pl
309 %attr(755,root,root) %{_bindir}/vmware-wizard
310 %dir %{_libdir}/vmware
311 %dir %{_libdir}/vmware/bin
312 # warning: SUID !!!
313 %attr(4755,root,root) %{_libdir}/vmware/bin/vmware-vmx
314 %{_libdir}/vmware/config
315 %{_libdir}/vmware/floppies
316 %{_libdir}/vmware/isoimages
317 %{?with_internal_libs:%{_libdir}/vmware/lib}
318 %{_libdir}/vmware/licenses
319 %dir %{_libdir}/vmware/messages
320 %{_libdir}/vmware/messages/en
321 %lang(ja) %{_libdir}/vmware/messages/ja
322 %{_libdir}/vmware/xkeymap
323 %{_mandir}/man1/*
324 %attr(1777,root,root) %dir /var/run/vmware
325
326 %files debug
327 %defattr(644,root,root,755)
328 %dir %{_libdir}/vmware/bin-debug
329 # warning: SUID !!!
330 %attr(4755,root,root) %{_libdir}/vmware/bin-debug/vmware-vmx
331
332 %files help
333 %defattr(644,root,root,755)
334 %{_libdir}/vmware/help*
335
336 %files networking
337 %defattr(644,root,root,755)
338 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/vmware/vmnet.conf
339 %attr(754,root,root) /etc/rc.d/init.d/vmnet
340 %attr(755,root,root) %{_bindir}/vmnet-bridge
341 %attr(755,root,root) %{_bindir}/vmnet-dhcpd
342 %attr(755,root,root) %{_bindir}/vmnet-natd
343 %attr(755,root,root) %{_bindir}/vmnet-netifup
344 %attr(755,root,root) %{_bindir}/vmnet-sniffer
345 %attr(755,root,root) %{_bindir}/vmware-ping
346
347 %files samba
348 %defattr(644,root,root,755)
349 %doc lib/configurator/vmnet-smb.conf
350 %attr(755,root,root) %{_bindir}/vmware-nmbd
351 %attr(755,root,root) %{_bindir}/vmware-smbd
352 %attr(755,root,root) %{_bindir}/vmware-smbpasswd
353 %attr(755,root,root) %{_bindir}/vmware-smbpasswd.bin
354 %{_libdir}/vmware/smb
355
356 %files -n kernel-misc-vmmon
357 %defattr(644,root,root,755)
358 /lib/modules/%{_kernel_ver}/misc/vmmon.ko*
359
360 %files -n kernel-misc-vmnet
361 %defattr(644,root,root,755)
362 /lib/modules/%{_kernel_ver}/misc/vmnet.ko*
363
364 %if %{with smp} && %{with dist_kernel}
365 %files  -n kernel-smp-misc-vmmon
366 %defattr(644,root,root,755)
367 /lib/modules/%{_kernel_ver}smp/misc/vmmon.ko*
368
369 %files  -n kernel-smp-misc-vmnet
370 %defattr(644,root,root,755)
371 /lib/modules/%{_kernel_ver}smp/misc/vmnet.ko*
372 %endif
This page took 0.076528 seconds and 3 git commands to generate.