]> git.pld-linux.org Git - packages/VMware-player.git/blame - VMware-player.spec
- icons are needed (unfortunately scalable doesn't provide all needed so install...
[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
c744b566 44URL: http://www.vmware.com/
45BuildRequires: gcc-c++
46%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
47BuildRequires: rpm-perlprov
48BuildRequires: rpmbuild(macros) >= 1.268
49BuildRequires: sed >= 4.0
c744b566 50Requires: libgnomecanvasmm
51Requires: libview >= 0.5.5-2
52ExclusiveArch: %{ix86} %{x8664}
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55%define _noautoprovfiles %{_libdir}/vmware/lib/.*\.so.*
56
57%description
58VMware Player Virtual Platform is a thin software layer that allows
59multiple guest operating systems to run concurrently on a single
60standard PC, without repartitioning or rebooting, and without
61significant loss of performance.
62
8cef0267 63%description -l pl.UTF-8
c744b566 64VMware Player Virtual Platform to cienka warstwa oprogramowania
8cef0267
JR
65pozwalająca na jednoczesne działanie wielu gościnnych systemów
66operacyjnych na jednym zwykłym PC, bez repartycjonowania ani
67rebootowania, bez znacznej utraty wydajności.
c744b566 68
69%package debug
70Summary: VMware debug utility
ae690285 71Summary(pl.UTF-8): Narzędzie VMware do odpluskwiania
c744b566 72Group: Applications/Emulators
73Requires: %{name} = %{version}-%{release}
74
75%description debug
76VMware debug utility.
77
8cef0267
JR
78%description debug -l pl.UTF-8
79Narzędzie VMware do odpluskwiania.
c744b566 80
81%package help
82Summary: VMware Player help files
ae690285 83Summary(pl.UTF-8): Pliki pomocy dla VMware Player
c744b566 84Group: Applications/Emulators
85Requires: %{name} = %{version}-%{release}
86Requires: mozilla
87
88%description help
89VMware Player help files.
90
8cef0267 91%description help -l pl.UTF-8
c744b566 92Pliki pomocy dla VMware Player.
93
94%package networking
95Summary: VMware networking utilities
ae690285 96Summary(pl.UTF-8): Narzędzia VMware do obsługi sieci
c744b566 97Group: Applications/Emulators
98Requires(post,preun): /sbin/chkconfig
99Requires: %{name} = %{version}-%{release}
c744b566 100Requires: rc-scripts
101Obsoletes: VMware-Player-samba
102
103%description networking
104VMware networking utilities.
105
8cef0267
JR
106%description networking -l pl.UTF-8
107Narzędzia VMware do obsługi sieci.
c744b566 108
7eb646b8 109%package -n kernel%{_alt_kernel}-misc-vmmon
c744b566 110Summary: Kernel module for VMware Player
ae690285 111Summary(pl.UTF-8): Moduł jądra dla VMware Player
c744b566 112Release: %{_rel}@%{_kernel_ver_str}
113Group: Base/Kernel
114Requires(post,postun): /sbin/depmod
115Requires: dev >= 2.9.0-7
116%if %{with dist_kernel}
a0a85295 117%requires_releq_kernel
118Requires(postun): %releq_kernel
c744b566 119%endif
120Provides: kernel(vmmon) = %{version}-%{_rel}
121
7eb646b8 122%description -n kernel%{_alt_kernel}-misc-vmmon
c744b566 123Kernel modules for VMware Player - vmmon.
124
8cef0267
JR
125%description -n kernel%{_alt_kernel}-misc-vmmon -l pl.UTF-8
126Moduły jądra dla VMware Player - vmmon.
c744b566 127
7eb646b8 128%package -n kernel%{_alt_kernel}-misc-vmnet
c744b566 129Summary: Kernel module for VMware Player
ae690285 130Summary(pl.UTF-8): Moduł jądra dla VMware Player
c744b566 131Release: %{_rel}@%{_kernel_ver_str}
132Group: Base/Kernel
133Requires(post,postun): /sbin/depmod
134Requires: dev >= 2.9.0-7
135%if %{with dist_kernel}
a0a85295 136%requires_releq_kernel
137Requires(postun): %releq_kernel
c744b566 138%endif
139Provides: kernel(vmnet) = %{version}-%{_rel}
140
7eb646b8 141%description -n kernel%{_alt_kernel}-misc-vmnet
c744b566 142Kernel modules for VMware Player - vmnet.
143
8cef0267
JR
144%description -n kernel%{_alt_kernel}-misc-vmnet -l pl.UTF-8
145Moduły jądra dla VMware Player - vmnet.
c744b566 146
c744b566 147%prep
a0a85295 148%setup -q -n vmware-player-distrib -a2
c744b566 149cd vmware-any-any-update%{_urel}
150tar xf vmmon.tar
151tar xf vmnet.tar
152cp -a vmmon-only{,.clean}
153cp -a vmnet-only{,.clean}
154sed -e 's/filter x86_64%/filter x86_64% amd64% ia64%/' \
155 -i vmnet-only.clean/Makefile.kernel
156cd -
157
158%build
159sed -i 's:vm_db_answer_LIBDIR:VM_LIBDIR:g;s:vm_db_answer_BINDIR:VM_BINDIR:g' bin/vmplayer
160
161cd vmware-any-any-update%{_urel}
162chmod u+w ../lib/bin/vmware-vmx ../lib/bin-debug/vmware-vmx ../bin/vmnet-bridge
163
164%if %{with kernel}
165rm -rf built
166mkdir built
167
c744b566 168for mod in vmmon vmnet ; do
f91e9f90 169 for cfg in %{?with_dist_kernel:dist}%{!?with_dist_kernel:nondist}; do
c744b566 170 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
171 exit 1
172 fi
173 rm -rf $mod-only
174 cp -a $mod-only.clean $mod-only
175 cd $mod-only
176 install -d o/include/linux
177 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
178 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
179 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
180 if grep -q "^CONFIG_PREEMPT_RT=y$" o/.config; then
181 sed -e '/pollQueueLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(pollQueueLock)/' \
182 -e '/timerLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(timerLock)/' \
183 -i ../vmmon-only/linux/driver.c
184 sed -e 's/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(vnetHubLock)/' \
185 -i ../vmnet-only/hub.c
186 sed -e 's/RW_LOCK_UNLOCKED/RW_LOCK_UNLOCKED(vnetPeerLock)/' \
187 -i ../vmnet-only/driver.c
188 fi
189 %if %{with dist_kernel}
8bbcec96 190 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
c744b566 191 %else
192 install -d o/include/config
193 touch o/include/config/MARKER
194 ln -sf %{_kernelsrcdir}/scripts o/scripts
195 %endif
196 %{__make} -C %{_kernelsrcdir} modules \
197 VMWARE_VER=VME_V5 \
198 SRCROOT=$PWD \
199 M=$PWD O=$PWD/o \
200 VM_KBUILD=26 \
201 %{?with_verbose:V=1} \
202 VM_CCVER=%{_ccver}
203 mv -f $mod.ko ../built/$mod-$cfg.ko
204 cd -
205 done
206done
c744b566 207%endif
208
209%install
210rm -rf $RPM_BUILD_ROOT
211
212%if %{with userspace}
213install -d \
214 $RPM_BUILD_ROOT%{_sysconfdir}/vmware \
215 $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/{nat,dhcpd} \
216 $RPM_BUILD_ROOT%{_bindir} \
88741604 217 $RPM_BUILD_ROOT%{_libdir}/vmware/{bin,lib,share/pixmaps} \
c744b566 218 $RPM_BUILD_ROOT%{_mandir} \
219 $RPM_BUILD_ROOT%{_pixmapsdir} \
a9f9d85a 220 $RPM_BUILD_ROOT%{_iconsdir}/hicolor \
c744b566 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
a9f9d85a
AM
246cp -a lib/share/icons/hicolor/* $RPM_BUILD_ROOT%{_iconsdir}/hicolor
247
c744b566 248install lib/share/pixmaps/* $RPM_BUILD_ROOT%{_libdir}/vmware/share/pixmaps
f91e9f90 249install doc/EULA $RPM_BUILD_ROOT%{_libdir}/vmware/share
c744b566 250
251install bin/*-* $RPM_BUILD_ROOT%{_bindir}
252install lib/bin/vmware-vmx $RPM_BUILD_ROOT%{_libdir}/vmware/bin
88741604 253install lib/lib/libvmwarebase.so.0/libvmwarebase.so.0 $RPM_BUILD_ROOT%{_libdir}
254install lib/lib/libvmwareui.so.0/libvmwareui.so.0 $RPM_BUILD_ROOT%{_libdir}
c744b566 255
256cp -r lib/{bin-debug,config,help*,messages,xkeymap} \
257 $RPM_BUILD_ROOT%{_libdir}/vmware
258
259cat > $RPM_BUILD_ROOT%{_sysconfdir}/vmware/locations <<EOF
260VM_BINDIR=%{_bindir}
261VM_LIBDIR=%{_libdir}/vmware
262EOF
263
264%if %{with internal_libs}
265install bin/vmplayer $RPM_BUILD_ROOT%{_bindir}
266install lib/bin/vmplayer $RPM_BUILD_ROOT%{_libdir}/vmware/bin
88741604 267install lib/lib/* $RPM_BUILD_ROOT%{_libdir}/vmware/lib
c744b566 268cp -r lib/libconf $RPM_BUILD_ROOT%{_libdir}/vmware
269%else
270install lib/bin/vmplayer $RPM_BUILD_ROOT%{_bindir}
271%endif
272%endif
273
274%clean
275rm -rf $RPM_BUILD_ROOT
276
277%post networking
278/sbin/chkconfig --add vmnet
279%service vmnet restart "VMware networking service"
280
281%preun networking
282if [ "$1" = "0" ]; then
283 %service vmnet stop
284 /sbin/chkconfig --del vmnet
285fi
286
7eb646b8 287%post -n kernel%{_alt_kernel}-misc-vmmon
c744b566 288%depmod %{_kernel_ver}
289
7eb646b8 290%postun -n kernel%{_alt_kernel}-misc-vmmon
c744b566 291%depmod %{_kernel_ver}
292
7eb646b8 293%post -n kernel%{_alt_kernel}-misc-vmnet
c744b566 294%depmod %{_kernel_ver}
295
7eb646b8 296%postun -n kernel%{_alt_kernel}-misc-vmnet
c744b566 297%depmod %{_kernel_ver}
298
c744b566 299%if %{with userspace}
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}/vmplayer
88741604 306%attr(755,root,root) %{_libdir}/libvmwarebase.so.*
307%attr(755,root,root) %{_libdir}/libvmwareui.so.*
c744b566 308%dir %{_libdir}/vmware
309%dir %{_libdir}/vmware/bin
88741604 310%dir %{_libdir}/vmware/lib
c744b566 311# warning: SUID !!!
312%attr(4755,root,root) %{_libdir}/vmware/bin/vmware-vmx
313%{_libdir}/vmware/config
314%if %{with internal_libs}
315%attr(755,root,root) %{_libdir}/vmware/bin/vmware
c744b566 316%{_libdir}/vmware/lib/lib*
317%attr(755,root,root) %{_libdir}/vmware/lib/wrapper-gtk24.sh
318%endif
319%dir %{_libdir}/vmware/messages
88741604 320%lang(en) %{_libdir}/vmware/messages/en
c744b566 321%lang(ja) %{_libdir}/vmware/messages/ja
322%{_libdir}/vmware/share
323%{_libdir}/vmware/xkeymap
324%attr(1777,root,root) %dir /var/run/vmware
a9f9d85a
AM
325%{_iconsdir}/hicolor/*/*/*.png
326%{_iconsdir}/hicolor/*/*/*.svg
c744b566 327%{_pixmapsdir}/*.png
328%{_desktopdir}/%{name}.desktop
329
330%files debug
331%defattr(644,root,root,755)
332%dir %{_libdir}/vmware/bin-debug
333# warning: SUID !!!
334%attr(4755,root,root) %{_libdir}/vmware/bin-debug/vmware-vmx
335
336%files help
337%defattr(644,root,root,755)
338%{_libdir}/vmware/help*
339
340%files networking
341%defattr(644,root,root,755)
342%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet.conf
343%attr(754,root,root) /etc/rc.d/init.d/vmnet
344%attr(755,root,root) %{_bindir}/vmnet-bridge
345%attr(755,root,root) %{_bindir}/vmnet-dhcpd
346%attr(755,root,root) %{_bindir}/vmnet-natd
347%attr(755,root,root) %{_bindir}/vmnet-netifup
348%attr(755,root,root) %{_bindir}/vmnet-sniffer
349%attr(755,root,root) %{_bindir}/vmware-ping
350%dir %{_sysconfdir}/vmware/vmnet8
88741604 351%dir %{_sysconfdir}/vmware/vmnet8/dhcpd
352%dir %{_sysconfdir}/vmware/vmnet8/nat
c744b566 353%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
354%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/nat/nat.conf
355%verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases*
356
c744b566 357%endif
358
359%if %{with kernel}
7eb646b8 360%files -n kernel%{_alt_kernel}-misc-vmmon
c744b566 361%defattr(644,root,root,755)
362/lib/modules/%{_kernel_ver}/misc/vmmon.ko*
363
7eb646b8 364%files -n kernel%{_alt_kernel}-misc-vmnet
c744b566 365%defattr(644,root,root,755)
366/lib/modules/%{_kernel_ver}/misc/vmnet.ko*
367
c744b566 368%endif
This page took 0.109292 seconds and 4 git commands to generate.