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