]> git.pld-linux.org Git - packages/VMware-player.git/blob - VMware-player.spec
- update for player
[packages/VMware-player.git] / VMware-player.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace utilities
6 %bcond_with     internal_libs   # internal libs stuff
7 %bcond_with     verbose         # verbose build (V=1)
8 #
9 %include        /usr/lib/rpm/macros.perl
10
11 %ifarch %{x8664}
12 %undefine       with_userspace
13 %endif
14 #
15 %define         _ver    2.0.2
16 %define         _build  59824
17 %define         _rel    0.1
18 %define         _urel   115
19 %define         _ccver  %(rpm -q --qf "%{VERSION}" gcc)
20 #
21 Summary:        VMware player
22 Summary(pl.UTF-8):      VMware player - wirtualna platforma dla stacji roboczej
23 Name:           VMware-player
24 Version:        %{_ver}.%{_build}
25 Release:        %{_rel}
26 License:        custom, non-distributable
27 Group:          Applications/Emulators
28 Source0:        http://download3.vmware.com/software/vmplayer/%{name}-%{_ver}-%{_build}.i386.tar.gz
29 # NoSource0-md5:        0c108db615943d71b78f18826611acce
30 NoSource:       0
31 Source1:        http://download3.vmware.com/software/vmplayer/%{name}-%{_ver}-%{_build}.x86_64.tar.gz
32 # NoSource1-md5:        f59a77f3e3b8e87591eff605c4bbb796
33 NoSource:       1
34 Source2:        http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update%{_urel}.tar.gz
35 # Source2-md5:  ab33ff7a799fee77f0f4ba5667cd4b9a
36 Source3:        %{name}-vmnet.conf
37 Source4:        %{name}.png
38 Source5:        %{name}.desktop
39 Source6:        %{name}-nat.conf
40 Source7:        %{name}-dhcpd.conf
41 Source8:        %{name}.init
42 Patch0:         %{name}-Makefile.patch
43 Patch1:         %{name}-run_script.patch
44 URL:            http://www.vmware.com/
45 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 3:2.6.7}
46 BuildRequires:  libstdc++-devel
47 BuildRequires:  rpm-perlprov
48 BuildRequires:  rpmbuild(macros) >= 1.268
49 BuildRequires:  sed >= 4.0
50 Requires:       libgnomecanvasmm
51 Requires:       libview >= 0.5.5-2
52 Requires:       openssl >= 0.9.7
53 ExclusiveArch:  %{ix86} %{x8664}
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %define         _noautoprovfiles %{_libdir}/vmware/lib/.*\.so.*
57
58 %description
59 VMware Player Virtual Platform is a thin software layer that allows
60 multiple guest operating systems to run concurrently on a single
61 standard PC, without repartitioning or rebooting, and without
62 significant loss of performance.
63
64 %description -l pl.UTF-8
65 VMware Player Virtual Platform to cienka warstwa oprogramowania
66 pozwalająca na jednoczesne działanie wielu gościnnych systemów
67 operacyjnych na jednym zwykłym PC, bez repartycjonowania ani
68 rebootowania, bez znacznej utraty wydajności.
69
70 %package debug
71 Summary:        VMware debug utility
72 Summary(pl.UTF-8):      Narzędzie VMware do odpluskwiania
73 Group:          Applications/Emulators
74 Requires:       %{name} = %{version}-%{release}
75
76 %description debug
77 VMware debug utility.
78
79 %description debug -l pl.UTF-8
80 Narzędzie VMware do odpluskwiania.
81
82 %package help
83 Summary:        VMware Player help files
84 Summary(pl.UTF-8):      Pliki pomocy dla VMware Player
85 Group:          Applications/Emulators
86 Requires:       %{name} = %{version}-%{release}
87
88 %description help
89 VMware Player help files.
90
91 %description help -l pl.UTF-8
92 Pliki pomocy dla VMware Player.
93
94 %package networking
95 Summary:        VMware networking utilities
96 Summary(pl.UTF-8):      Narzędzia VMware do obsługi sieci
97 Group:          Applications/Emulators
98 Requires(post,preun):   /sbin/chkconfig
99 Requires:       %{name} = %{version}-%{release}
100 Requires:       rc-scripts
101 Obsoletes:      VMware-Player-samba
102
103 %description networking
104 VMware networking utilities.
105
106 %description networking -l pl.UTF-8
107 Narzędzia VMware do obsługi sieci.
108
109 %package -n kernel%{_alt_kernel}-misc-vmmon
110 Summary:        Kernel module for VMware Player
111 Summary(pl.UTF-8):      Moduł jądra dla VMware Player
112 Release:        %{_rel}@%{_kernel_ver_str}
113 Group:          Base/Kernel
114 Requires(post,postun):  /sbin/depmod
115 Requires:       dev >= 2.9.0-7
116 %if %{with dist_kernel}
117 %requires_releq_kernel
118 Requires(postun):       %releq_kernel
119 %endif
120 Provides:       kernel(vmmon) = %{version}-%{_rel}
121
122 %description -n kernel%{_alt_kernel}-misc-vmmon
123 Kernel modules for VMware Player - vmmon.
124
125 %description -n kernel%{_alt_kernel}-misc-vmmon -l pl.UTF-8
126 Moduły jądra dla VMware Player - vmmon.
127
128 %package -n kernel%{_alt_kernel}-misc-vmnet
129 Summary:        Kernel module for VMware Player
130 Summary(pl.UTF-8):      Moduł jądra dla VMware Player
131 Release:        %{_rel}@%{_kernel_ver_str}
132 Group:          Base/Kernel
133 Requires(post,postun):  /sbin/depmod
134 Requires:       dev >= 2.9.0-7
135 %if %{with dist_kernel}
136 %requires_releq_kernel
137 Requires(postun):       %releq_kernel
138 %endif
139 Provides:       kernel(vmnet) = %{version}-%{_rel}
140
141 %description -n kernel%{_alt_kernel}-misc-vmnet
142 Kernel modules for VMware Player - vmnet.
143
144 %description -n kernel%{_alt_kernel}-misc-vmnet -l pl.UTF-8
145 Moduły jądra dla VMware Player - vmnet.
146
147 %prep
148 %setup -q -n vmware-player-distrib -a2
149 cd vmware-any-any-update%{_urel}
150 tar xf vmmon.tar
151 tar xf vmnet.tar
152 cp -a vmmon-only{,.clean}
153 cp -a vmnet-only{,.clean}
154 sed -e 's/filter x86_64%/filter x86_64% amd64% ia64%/' \
155         -i vmnet-only.clean/Makefile.kernel
156 cd -
157
158 %build
159 sed -i 's:vm_db_answer_LIBDIR:VM_LIBDIR:g;s:vm_db_answer_BINDIR:VM_BINDIR:g' bin/vmplayer
160
161 cd vmware-any-any-update%{_urel}
162 chmod u+w ../lib/bin/vmware-vmx ../lib/bin-debug/vmware-vmx ../bin/vmnet-bridge
163
164 # hack until new any-any-update version available
165 sed -i -e 's/#define.*VMMON_VERSION_V6.*/#define VMMON_VERSION_V6               (167 << 16 | 0)/g' vmmon-only.clean/include/iocontrols_compat.h
166
167 %if %{with kernel}
168 rm -rf built
169 mkdir built
170
171 for mod in vmmon vmnet ; do
172         for cfg in %{?with_dist_kernel:dist}%{!?with_dist_kernel:nondist}; do
173                 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
174                         exit 1
175                 fi
176                 rm -rf $mod-only
177                 cp -a $mod-only.clean $mod-only
178                 cd $mod-only
179                 install -d o/include/linux
180                 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
181                 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
182                 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
183         if grep -q "^CONFIG_PREEMPT_RT=y$" o/.config; then
184                 sed -e '/pollQueueLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(pollQueueLock)/' \
185                         -e '/timerLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(timerLock)/' \
186                         -i ../vmmon-only/linux/driver.c
187                 sed -e 's/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(vnetHubLock)/' \
188                         -i ../vmnet-only/hub.c
189                 sed -e 's/RW_LOCK_UNLOCKED/RW_LOCK_UNLOCKED(vnetPeerLock)/' \
190                         -i ../vmnet-only/driver.c
191         fi
192         %if %{with dist_kernel}
193                 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
194         %else
195                 install -d o/include/config
196                 touch o/include/config/MARKER
197                 ln -sf %{_kernelsrcdir}/scripts o/scripts
198                 %endif
199                 %{__make} -C %{_kernelsrcdir} modules \
200                         VMWARE_VER=VME_V5 \
201                         SRCROOT=$PWD \
202                         M=$PWD O=$PWD/o \
203                         VM_KBUILD=26 \
204                         %{?with_verbose:V=1} \
205                         VM_CCVER=%{_ccver}
206                 mv -f $mod.ko ../built/$mod-$cfg.ko
207                 cd -
208         done
209 done
210 %endif
211
212 %install
213 rm -rf $RPM_BUILD_ROOT
214
215 %if %{with userspace}
216 install -d \
217         $RPM_BUILD_ROOT%{_sysconfdir}/vmware \
218         $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/{nat,dhcpd} \
219         $RPM_BUILD_ROOT%{_bindir} \
220         $RPM_BUILD_ROOT%{_libdir}/vmware/{bin,lib,share/pixmaps} \
221         $RPM_BUILD_ROOT%{_mandir} \
222         $RPM_BUILD_ROOT%{_pixmapsdir} \
223         $RPM_BUILD_ROOT%{_iconsdir}/hicolor \
224         $RPM_BUILD_ROOT%{_desktopdir} \
225         $RPM_BUILD_ROOT/etc/rc.d/init.d \
226         $RPM_BUILD_ROOT/var/run/vmware
227 %endif
228
229 %if %{with kernel}
230 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
231 echo "options vmmon vmversion=16" > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{name}-vmmon.conf
232
233 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
234
235 cd vmware-any-any-update%{_urel}/built
236 install vmmon* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmmon.ko
237 install vmnet* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmnet.ko
238 cd -
239 %endif
240
241 %if %{with userspace}
242 install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/vmnet
243 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet.conf
244 install %{SOURCE4} $RPM_BUILD_ROOT%{_pixmapsdir}
245 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
246 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/nat/nat.conf
247 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
248
249 touch $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases
250 touch $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases~
251
252 cp -a lib/share/icons/hicolor/* $RPM_BUILD_ROOT%{_iconsdir}/hicolor
253
254 install lib/share/pixmaps/* $RPM_BUILD_ROOT%{_libdir}/vmware/share/pixmaps
255 install doc/EULA $RPM_BUILD_ROOT%{_libdir}/vmware/share/EULA.txt
256
257 install bin/*-* $RPM_BUILD_ROOT%{_bindir}
258 install lib/bin/vmware-vmx $RPM_BUILD_ROOT%{_libdir}/vmware/bin
259 install lib/lib/libvmwarebase.so.0/libvmwarebase.so.0 $RPM_BUILD_ROOT%{_libdir}
260 install lib/lib/libvmwareui.so.0/libvmwareui.so.0 $RPM_BUILD_ROOT%{_libdir}
261
262 cp -r   lib/{bin-debug,config,help*,messages,xkeymap} \
263         $RPM_BUILD_ROOT%{_libdir}/vmware
264
265 cat > $RPM_BUILD_ROOT%{_sysconfdir}/vmware/locations <<EOF
266 VM_BINDIR=%{_bindir}
267 VM_LIBDIR=%{_libdir}/vmware
268 EOF
269
270 %if %{with internal_libs}
271 install bin/vmplayer $RPM_BUILD_ROOT%{_bindir}
272 install lib/bin/vmplayer $RPM_BUILD_ROOT%{_libdir}/vmware/bin
273 cp -r   lib/lib/* $RPM_BUILD_ROOT%{_libdir}/vmware/lib
274 cp -r   lib/libconf $RPM_BUILD_ROOT%{_libdir}/vmware
275 %else
276 install lib/bin/vmplayer $RPM_BUILD_ROOT%{_bindir}
277 install -d $RPM_BUILD_ROOT%{_libdir}/vmware/lib/lib{crypto,ssl}.so.0.9.7
278 ln -s %{_libdir}/libcrypto.so $RPM_BUILD_ROOT%{_libdir}/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7
279 ln -s %{_libdir}/libssl.so $RPM_BUILD_ROOT%{_libdir}/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7
280 %endif
281
282 # remove not needed files
283 rm -rf $RPM_BUILD_ROOT%{_bindir}/vmware-{config,uninstall}.pl $RPM_BUILD_ROOT%{_iconsdir}/hicolor/index.theme
284 %endif
285
286 %clean
287 rm -rf $RPM_BUILD_ROOT
288
289 %post networking
290 /sbin/chkconfig --add vmnet
291 %service vmnet restart "VMware networking service"
292
293 %preun networking
294 if [ "$1" = "0" ]; then
295         %service vmnet stop
296         /sbin/chkconfig --del vmnet
297 fi
298
299 %post   -n kernel%{_alt_kernel}-misc-vmmon
300 %depmod %{_kernel_ver}
301
302 %postun -n kernel%{_alt_kernel}-misc-vmmon
303 %depmod %{_kernel_ver}
304
305 %post   -n kernel%{_alt_kernel}-misc-vmnet
306 %depmod %{_kernel_ver}
307
308 %postun -n kernel%{_alt_kernel}-misc-vmnet
309 %depmod %{_kernel_ver}
310
311 %if %{with userspace}
312 %files
313 %defattr(644,root,root,755)
314 %doc doc/* lib/configurator/vmnet-{dhcpd,nat}.conf
315 %dir %{_sysconfdir}/vmware
316 %{_sysconfdir}/vmware/locations
317 %attr(755,root,root) %{_bindir}/vmplayer
318 %attr(755,root,root) %{_bindir}/vmware-acetool
319 %attr(755,root,root) %{_bindir}/vm-support
320 %attr(755,root,root) %{_libdir}/libvmwarebase.so.*
321 %attr(755,root,root) %{_libdir}/libvmwareui.so.*
322 %dir %{_libdir}/vmware
323 %dir %{_libdir}/vmware/bin
324 %{_libdir}/vmware/lib
325 # package old openssl (buggy but needed to work)
326 %attr(755,root,root) %{_libdir}/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7
327 # warning: SUID !!!
328 %attr(4755,root,root) %{_libdir}/vmware/bin/vmware-vmx
329 %{_libdir}/vmware/config
330 %if %{with internal_libs}
331 %attr(755,root,root) %{_libdir}/vmware/bin/vmplayer
332 %{_libdir}/vmware/lib/lib*
333 %attr(755,root,root) %{_libdir}/vmware/lib/wrapper-gtk24.sh
334 %endif
335 %dir %{_libdir}/vmware/messages
336 %lang(en) %{_libdir}/vmware/messages/en
337 %lang(ja) %{_libdir}/vmware/messages/ja
338 %{_libdir}/vmware/share
339 %{_libdir}/vmware/xkeymap
340 %attr(1777,root,root) %dir /var/run/vmware
341 %{_iconsdir}/hicolor/*/*/*.png
342 %{_iconsdir}/hicolor/*/*/*.svg
343 %{_pixmapsdir}/*.png
344 %{_desktopdir}/%{name}.desktop
345
346 %files debug
347 %defattr(644,root,root,755)
348 %dir %{_libdir}/vmware/bin-debug
349 # warning: SUID !!!
350 %attr(4755,root,root) %{_libdir}/vmware/bin-debug/vmware-vmx
351
352 %files help
353 %defattr(644,root,root,755)
354 %{_libdir}/vmware/help*
355
356 %files networking
357 %defattr(644,root,root,755)
358 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet.conf
359 %attr(754,root,root) /etc/rc.d/init.d/vmnet
360 %attr(755,root,root) %{_bindir}/vmnet-bridge
361 %attr(755,root,root) %{_bindir}/vmnet-detect
362 %attr(755,root,root) %{_bindir}/vmnet-dhcpd
363 %attr(755,root,root) %{_bindir}/vmnet-natd
364 %attr(755,root,root) %{_bindir}/vmnet-netifup
365 %attr(755,root,root) %{_bindir}/vmnet-sniffer
366 %attr(755,root,root) %{_bindir}/vmware-ping
367 %dir %{_sysconfdir}/vmware/vmnet8
368 %dir %{_sysconfdir}/vmware/vmnet8/dhcpd
369 %dir %{_sysconfdir}/vmware/vmnet8/nat
370 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
371 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/nat/nat.conf
372 %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases*
373
374 %endif
375
376 %if %{with kernel}
377 %files -n kernel%{_alt_kernel}-misc-vmmon
378 %defattr(644,root,root,755)
379 %{_sysconfdir}/modprobe.d/%{name}-vmmon.conf
380 /lib/modules/%{_kernel_ver}/misc/vmmon.ko*
381
382 %files -n kernel%{_alt_kernel}-misc-vmnet
383 %defattr(644,root,root,755)
384 /lib/modules/%{_kernel_ver}/misc/vmnet.ko*
385
386 %endif
This page took 0.083174 seconds and 3 git commands to generate.