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