]> git.pld-linux.org Git - packages/VMware-player.git/blame - VMware-player.spec
- run vmplayer, cause this is player - not workstation
[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 \
7fc500cc 219 $RPM_BUILD_ROOT%{_sysconfdir}/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}
7fc500cc 232install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
233echo "options vmmon vmversion=16" > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{name}-vmmon.conf
4b4af15f 234
c744b566 235install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
236
f91e9f90 237cd vmware-any-any-update%{_urel}/built
238install vmmon* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmmon.ko
239install vmnet* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmnet.ko
c744b566 240cd -
241%endif
242
243%if %{with userspace}
a0a85295 244install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/vmnet
c744b566 245install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet.conf
246install %{SOURCE4} $RPM_BUILD_ROOT%{_pixmapsdir}
247install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
248install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/nat/nat.conf
249install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
250
251touch $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases
252touch $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases~
253
a9f9d85a
AM
254cp -a lib/share/icons/hicolor/* $RPM_BUILD_ROOT%{_iconsdir}/hicolor
255
c744b566 256install lib/share/pixmaps/* $RPM_BUILD_ROOT%{_libdir}/vmware/share/pixmaps
35a6bee6 257install doc/EULA $RPM_BUILD_ROOT%{_libdir}/vmware/share/EULA.txt
c744b566 258
259install bin/*-* $RPM_BUILD_ROOT%{_bindir}
260install lib/bin/vmware-vmx $RPM_BUILD_ROOT%{_libdir}/vmware/bin
88741604 261install lib/lib/libvmwarebase.so.0/libvmwarebase.so.0 $RPM_BUILD_ROOT%{_libdir}
262install lib/lib/libvmwareui.so.0/libvmwareui.so.0 $RPM_BUILD_ROOT%{_libdir}
c744b566 263
264cp -r lib/{bin-debug,config,help*,messages,xkeymap} \
265 $RPM_BUILD_ROOT%{_libdir}/vmware
266
267cat > $RPM_BUILD_ROOT%{_sysconfdir}/vmware/locations <<EOF
268VM_BINDIR=%{_bindir}
269VM_LIBDIR=%{_libdir}/vmware
270EOF
271
272%if %{with internal_libs}
273install bin/vmplayer $RPM_BUILD_ROOT%{_bindir}
274install lib/bin/vmplayer $RPM_BUILD_ROOT%{_libdir}/vmware/bin
88741604 275install lib/lib/* $RPM_BUILD_ROOT%{_libdir}/vmware/lib
c744b566 276cp -r lib/libconf $RPM_BUILD_ROOT%{_libdir}/vmware
277%else
278install lib/bin/vmplayer $RPM_BUILD_ROOT%{_bindir}
279%endif
280%endif
281
282%clean
283rm -rf $RPM_BUILD_ROOT
284
285%post networking
286/sbin/chkconfig --add vmnet
287%service vmnet restart "VMware networking service"
288
289%preun networking
290if [ "$1" = "0" ]; then
291 %service vmnet stop
292 /sbin/chkconfig --del vmnet
293fi
294
7eb646b8 295%post -n kernel%{_alt_kernel}-misc-vmmon
c744b566 296%depmod %{_kernel_ver}
297
7eb646b8 298%postun -n kernel%{_alt_kernel}-misc-vmmon
c744b566 299%depmod %{_kernel_ver}
300
7eb646b8 301%post -n kernel%{_alt_kernel}-misc-vmnet
c744b566 302%depmod %{_kernel_ver}
303
7eb646b8 304%postun -n kernel%{_alt_kernel}-misc-vmnet
c744b566 305%depmod %{_kernel_ver}
306
c744b566 307%if %{with userspace}
308%files
309%defattr(644,root,root,755)
310%doc doc/* lib/configurator/vmnet-{dhcpd,nat}.conf
311%dir %{_sysconfdir}/vmware
312%{_sysconfdir}/vmware/locations
313%attr(755,root,root) %{_bindir}/vmplayer
152da996
AM
314%attr(755,root,root) %{_bindir}/vmware-acetool
315%attr(755,root,root) %{_bindir}/vm-support
88741604 316%attr(755,root,root) %{_libdir}/libvmwarebase.so.*
317%attr(755,root,root) %{_libdir}/libvmwareui.so.*
c744b566 318%dir %{_libdir}/vmware
319%dir %{_libdir}/vmware/bin
88741604 320%dir %{_libdir}/vmware/lib
c744b566 321# warning: SUID !!!
322%attr(4755,root,root) %{_libdir}/vmware/bin/vmware-vmx
323%{_libdir}/vmware/config
324%if %{with internal_libs}
325%attr(755,root,root) %{_libdir}/vmware/bin/vmware
c744b566 326%{_libdir}/vmware/lib/lib*
327%attr(755,root,root) %{_libdir}/vmware/lib/wrapper-gtk24.sh
328%endif
329%dir %{_libdir}/vmware/messages
88741604 330%lang(en) %{_libdir}/vmware/messages/en
c744b566 331%lang(ja) %{_libdir}/vmware/messages/ja
332%{_libdir}/vmware/share
333%{_libdir}/vmware/xkeymap
334%attr(1777,root,root) %dir /var/run/vmware
a9f9d85a
AM
335%{_iconsdir}/hicolor/*/*/*.png
336%{_iconsdir}/hicolor/*/*/*.svg
c744b566 337%{_pixmapsdir}/*.png
338%{_desktopdir}/%{name}.desktop
339
340%files debug
341%defattr(644,root,root,755)
342%dir %{_libdir}/vmware/bin-debug
343# warning: SUID !!!
344%attr(4755,root,root) %{_libdir}/vmware/bin-debug/vmware-vmx
345
346%files help
347%defattr(644,root,root,755)
348%{_libdir}/vmware/help*
349
350%files networking
351%defattr(644,root,root,755)
352%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet.conf
353%attr(754,root,root) /etc/rc.d/init.d/vmnet
354%attr(755,root,root) %{_bindir}/vmnet-bridge
152da996 355%attr(755,root,root) %{_bindir}/vmnet-detect
c744b566 356%attr(755,root,root) %{_bindir}/vmnet-dhcpd
357%attr(755,root,root) %{_bindir}/vmnet-natd
358%attr(755,root,root) %{_bindir}/vmnet-netifup
359%attr(755,root,root) %{_bindir}/vmnet-sniffer
360%attr(755,root,root) %{_bindir}/vmware-ping
361%dir %{_sysconfdir}/vmware/vmnet8
88741604 362%dir %{_sysconfdir}/vmware/vmnet8/dhcpd
363%dir %{_sysconfdir}/vmware/vmnet8/nat
c744b566 364%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
365%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/nat/nat.conf
366%verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases*
367
c744b566 368%endif
369
370%if %{with kernel}
7eb646b8 371%files -n kernel%{_alt_kernel}-misc-vmmon
c744b566 372%defattr(644,root,root,755)
7fc500cc 373%{_sysconfdir}/modprobe.d/%{name}-vmmon.conf
c744b566 374/lib/modules/%{_kernel_ver}/misc/vmmon.ko*
375
7eb646b8 376%files -n kernel%{_alt_kernel}-misc-vmnet
c744b566 377%defattr(644,root,root,755)
378/lib/modules/%{_kernel_ver}/misc/vmnet.ko*
379
c744b566 380%endif
This page took 0.125493 seconds and 4 git commands to generate.