- converted to UTF-8
[packages/VMware-server.git] / VMware-server.spec
CommitLineData
21baaa38
MM
1#
2# This doesn't work at all yet. I don't know if the management interface is needed
3# (bundling apache seems like a sooooooooo great idea). Maybe it is possible to
4# setup the server part by hand. The perl module in perl/control.tar needs to
ad4726ec 5# be packaged (vmware-cmd requires that). Something needs to be done with
21baaa38 6# the authd (inetd integration is needed I guess).
ad4726ec 7#
21baaa38
MM
8# The modules from any-any upgrade are too old (I used the ones comming with VMw-S).
9#
10# It builds on amd64, I have changed the networking package not to require the main package
ad4726ec 11# so it can be installed outside 32bit chroot.
21baaa38
MM
12#
13# But hey, it's at least free ;-)
14#
15# I probably won't have time to work on this, switching to vmware-player.
16#
17#
18# Conditional build:
19%bcond_without dist_kernel # without distribution kernel
20%bcond_without kernel # don't build kernel modules
21%bcond_without smp # without SMP kernel modules
22%bcond_without userspace # don't build userspace utilities
23%bcond_with kernel24 # build kernel24 modules (disable kernel26)
24%bcond_with internal_libs # internal libs stuff
25%bcond_with verbose # verbose build (V=1)
26#
27%include /usr/lib/rpm/macros.perl
28%if %{with kernel24}
29%define _kernelsrcdir /usr/src/linux-2.4
30%endif
31#
b98bf282 32%define _ver 1.0.0
33%define _build 28343
8061af32 34%define _rel 0.1
ac977af5 35%define _urel 104
4be390e9 36%define _ccver %(rpm -q --qf "%{VERSION}" gcc)
21baaa38
MM
37#
38Summary: VMware Server
73ea1463 39Summary(pl.UTF-8): VMware Server - wirtualna platforma dla stacji roboczej
21baaa38 40Name: VMware-server
b98bf282 41Version: %{_ver}.%{_build}
21baaa38
MM
42Release: %{_rel}
43License: custom, non-distributable
44Group: Applications/Emulators
45Source0: http://download3.vmware.com/software/vmserver/%{name}-%{_ver}-%{_build}.tar.gz
b98bf282 46# NoSource0-md5: a25b4beb53785c05ef3b3077d87f6e2b
21baaa38 47Source1: http://download3.vmware.com/software/vmserver/VMware-mui-%{_ver}-%{_build}.tar.gz
b98bf282 48# NoSource1-md5: 0de45c02fcaa30ac41517b687f34b29b
21baaa38 49Source2: http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update%{_urel}.tar.gz
75cc756d 50# NoSource2-md5: 8cba16d3f6b3723b43d555a5f7cbf850
21baaa38
MM
51Source3: %{name}.init
52Source4: %{name}-vmnet.conf
53Source5: %{name}.png
54Source6: %{name}.desktop
55Source7: %{name}-nat.conf
56Source8: %{name}-dhcpd.conf
57Patch0: %{name}-Makefile.patch
58Patch1: %{name}-run_script.patch
73b8f8bc 59Patch2: %{name}-init_pl.patch
21baaa38 60NoSource: 0
2f4f313a
JB
61NoSource: 1
62NoSource: 2
21baaa38
MM
63URL: http://www.vmware.com/
64BuildRequires: gcc-c++
3c34bc99 65%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
21baaa38 66BuildRequires: rpm-perlprov
ad4726ec 67BuildRequires: rpmbuild(macros) >= 1.268
21baaa38 68BuildRequires: sed >= 4.0
21baaa38
MM
69Requires: libgnomecanvasmm
70ExclusiveArch: %{ix86}
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73%define _noautoprovfiles %{_libdir}/vmware*/lib/.*\.so.*
74
75%description
ad4726ec
ER
76VMware Server Virtual Platform is a thin software layer that allows
77multiple guest operating systems to run concurrently on a single
78standard PC, without repartitioning or rebooting, and without
21baaa38
MM
79significant loss of performance.
80
73ea1463 81%description -l pl.UTF-8
21baaa38 82VMware Server Virtual Platform to cienka warstwa oprogramowania
73ea1463
JR
83pozwalająca na jednoczesne działanie wielu gościnnych systemów
84operacyjnych na jednym zwykłym PC, bez repartycjonowania ani
85rebootowania, bez znacznej utraty wydajności.
21baaa38
MM
86
87%package debug
88Summary: VMware debug utility
73ea1463 89Summary(pl.UTF-8): Narzędzie VMware do odpluskwiania
21baaa38
MM
90Group: Applications/Emulators
91Requires: %{name} = %{version}-%{release}
92
93%description debug
94VMware debug utility.
95
73ea1463
JR
96%description debug -l pl.UTF-8
97Narzędzie VMware do odpluskwiania.
21baaa38
MM
98
99%package console
100Summary: VMware console utility
73ea1463 101Summary(pl.UTF-8): Konsola VMware
21baaa38
MM
102Group: Applications/Emulators
103Requires: %{name} = %{version}-%{release}
104
105%description console
106A tool for controlling VM.
107
73ea1463
JR
108%description console -l pl.UTF-8
109Narzędzie VMware do kontroli VM.
21baaa38
MM
110
111%package help
112Summary: VMware Server help files
73ea1463 113Summary(pl.UTF-8): Pliki pomocy dla VMware Server
21baaa38
MM
114Group: Applications/Emulators
115Requires: %{name} = %{version}-%{release}
116Requires: mozilla
117
118%description help
119VMware Server help files.
120
73ea1463 121%description help -l pl.UTF-8
21baaa38
MM
122Pliki pomocy dla VMware Server.
123
124%package console-help
125Summary: VMware Server console help files
73ea1463 126Summary(pl.UTF-8): Pliki pomocy dla konsoli VMware Server
21baaa38
MM
127Group: Applications/Emulators
128Requires: %{name} = %{version}-%{release}
129Requires: mozilla
130
131%description console-help
132VMware Server console help files.
133
73ea1463 134%description console-help -l pl.UTF-8
21baaa38
MM
135Pliki pomocy dla konsoli VMware Server.
136
137%package networking
138Summary: VMware networking utilities
73ea1463 139Summary(pl.UTF-8): Narzędzia VMware do obsługi sieci
21baaa38 140Group: Applications/Emulators
d3a099f0 141Requires(post,preun): /sbin/chkconfig
21baaa38 142#Requires: %{name} = %{version}-%{release}
d3a099f0 143Requires: rc-scripts
21baaa38
MM
144
145%description networking
146VMware networking utilities.
147
73ea1463
JR
148%description networking -l pl.UTF-8
149Narzędzia VMware do obsługi sieci.
21baaa38
MM
150
151%package samba
152Summary: VMware SMB utilities
73ea1463 153Summary(pl.UTF-8): Narzędzia VMware do SMB
21baaa38
MM
154Group: Applications/Emulators
155Requires: %{name} = %{version}-%{release}
156
157%description samba
158VMware SMB utilities.
159
73ea1463
JR
160%description samba -l pl.UTF-8
161Narzędzia VMware do SMB.
21baaa38
MM
162
163%package -n kernel-misc-vmmon
164Summary: Kernel module for VMware Server
73ea1463 165Summary(pl.UTF-8): Moduł jądra dla VMware Server
21baaa38
MM
166Release: %{_rel}@%{_kernel_ver_str}
167Group: Base/Kernel
168Requires(post,postun): /sbin/depmod
169Requires: dev >= 2.9.0-7
170%if %{with dist_kernel}
171%requires_releq_kernel_up
172Requires(postun): %releq_kernel_up
173%endif
174Provides: kernel(vmmon) = %{version}-%{_rel}
175
176%description -n kernel-misc-vmmon
177Kernel modules for VMware Server - vmmon.
178
73ea1463
JR
179%description -n kernel-misc-vmmon -l pl.UTF-8
180Moduły jądra dla VMware Server - vmmon.
21baaa38
MM
181
182%package -n kernel-misc-vmnet
183Summary: Kernel module for VMware Server
73ea1463 184Summary(pl.UTF-8): Moduł jądra dla VMware Server
21baaa38
MM
185Release: %{_rel}@%{_kernel_ver_str}
186Group: Base/Kernel
187Requires(post,postun): /sbin/depmod
188Requires: dev >= 2.9.0-7
189%if %{with dist_kernel}
190%requires_releq_kernel_up
191Requires(postun): %releq_kernel_up
192%endif
193Provides: kernel(vmnet) = %{version}-%{_rel}
194
195%description -n kernel-misc-vmnet
196Kernel modules for VMware Server - vmnet.
197
73ea1463
JR
198%description -n kernel-misc-vmnet -l pl.UTF-8
199Moduły jądra dla VMware Server - vmnet.
21baaa38
MM
200
201%package -n kernel-smp-misc-vmmon
202Summary: SMP kernel module for VMware Server
73ea1463 203Summary(pl.UTF-8): Moduł jądra SMP dla VMware Server
21baaa38
MM
204Release: %{_rel}@%{_kernel_ver_str}
205Group: Base/Kernel
206Requires(post,postun): /sbin/depmod
207Requires: dev >= 2.9.0-7
208%if %{with dist_kernel}
209%requires_releq_kernel_smp
210Requires(postun): %releq_kernel_smp
211%endif
212Provides: kernel(vmmon) = %{version}-%{_rel}
213
214%description -n kernel-smp-misc-vmmon
215SMP kernel modules fov VMware Server - vmmon-smp.
216
73ea1463
JR
217%description -n kernel-smp-misc-vmmon -l pl.UTF-8
218Moduły jądra SMP dla VMware Server - vmmon-smp.
21baaa38
MM
219
220%package -n kernel-smp-misc-vmnet
221Summary: SMP kernel module for VMware Server
73ea1463 222Summary(pl.UTF-8): Moduł jądra SMP dla VMware Server
21baaa38
MM
223Release: %{_rel}@%{_kernel_ver_str}
224Group: Base/Kernel
225Requires(post,postun): /sbin/depmod
226Requires: dev >= 2.9.0-7
227%if %{with dist_kernel}
228%requires_releq_kernel_smp
229Requires(postun): %releq_kernel_smp
230%endif
231Provides: kernel(vmnet) = %{version}-%{_rel}
232
233%description -n kernel-smp-misc-vmnet
234SMP kernel module for VMware Server - vmnet-smp.
235
73ea1463
JR
236%description -n kernel-smp-misc-vmnet -l pl.UTF-8
237Moduły jądra SMP dla VMware Server - vmnet-smp.
21baaa38
MM
238
239%package -n kernel24-misc-vmmon
240Summary: Kernel module for VMware Server
73ea1463 241Summary(pl.UTF-8): Moduł jądra dla VMware Server
21baaa38
MM
242Release: %{_rel}@%{_kernel_ver_str}
243Group: Base/Kernel
244Requires(post,postun): /sbin/depmod
245Requires: dev >= 2.9.0-7
246%if %{with dist_kernel}
247%requires_releq_kernel_up
248Requires(postun): %releq_kernel_up
249%endif
250Provides: kernel(vmmon) = %{version}-%{_rel}
251
252%description -n kernel24-misc-vmmon
253Kernel modules for VMware Server - vmmon.
254
73ea1463
JR
255%description -n kernel24-misc-vmmon -l pl.UTF-8
256Moduły jądra dla VMware Server - vmmon.
21baaa38
MM
257
258%package -n kernel24-misc-vmnet
259Summary: Kernel module for VMware Server
73ea1463 260Summary(pl.UTF-8): Moduł jądra dla VMware Server
21baaa38
MM
261Release: %{_rel}@%{_kernel_ver_str}
262Group: Base/Kernel
263Requires(post,postun): /sbin/depmod
264Requires: dev >= 2.9.0-7
265%if %{with dist_kernel}
266%requires_releq_kernel_up
267Requires(postun): %releq_kernel_up
268%endif
269Provides: kernel(vmnet) = %{version}-%{_rel}
270
271%description -n kernel24-misc-vmnet
272Kernel modules for VMware Server - vmnet.
273
73ea1463
JR
274%description -n kernel24-misc-vmnet -l pl.UTF-8
275Moduły jądra dla VMware Server - vmnet.
21baaa38
MM
276
277%package -n kernel24-smp-misc-vmmon
278Summary: SMP kernel module for VMware Server
73ea1463 279Summary(pl.UTF-8): Moduł jądra SMP dla VMware Server
21baaa38
MM
280Release: %{_rel}@%{_kernel_ver_str}
281Group: Base/Kernel
282Requires(post,postun): /sbin/depmod
283Requires: dev >= 2.9.0-7
284%if %{with dist_kernel}
285%requires_releq_kernel_smp
286Requires(postun): %releq_kernel_smp
287%endif
288Provides: kernel(vmmon) = %{version}-%{_rel}
289
290%description -n kernel24-smp-misc-vmmon
291SMP kernel modules fov VMware Server - vmmon-smp.
292
73ea1463
JR
293%description -n kernel24-smp-misc-vmmon -l pl.UTF-8
294Moduły jądra SMP dla VMware Server - vmmon-smp.
21baaa38
MM
295
296%package -n kernel24-smp-misc-vmnet
297Summary: SMP kernel module for VMware Server
73ea1463 298Summary(pl.UTF-8): Moduł jądra SMP dla VMware Server
21baaa38
MM
299Release: %{_rel}@%{_kernel_ver_str}
300Group: Base/Kernel
301Requires(post,postun): /sbin/depmod
302Requires: dev >= 2.9.0-7
303%if %{with dist_kernel}
304%requires_releq_kernel_smp
305Requires(postun): %releq_kernel_smp
306%endif
307Provides: kernel(vmnet) = %{version}-%{_rel}
308
309%description -n kernel24-smp-misc-vmnet
310SMP kernel module for VMware Server - vmnet-smp.
311
73ea1463
JR
312%description -n kernel24-smp-misc-vmnet -l pl.UTF-8
313Moduły jądra SMP dla VMware Server - vmnet-smp.
21baaa38
MM
314
315%prep
316%setup -q -n vmware-server-distrib -a1 -a2
a91c119e 317tar zxf vmware-mui-distrib/console-distrib/%{name}-console-%{_ver}-%{_build}.tar.gz
21baaa38
MM
318#cd vmware-any-any-update%{_urel}
319cd lib/modules/source
320tar xf vmmon.tar
321tar xf vmnet.tar
322%patch0 -p0
323cp -a vmmon-only{,.clean}
324cp -a vmnet-only{,.clean}
325cd -
326%patch1 -p1
73b8f8bc 327%patch2 -p0
35bca45b 328tar xf lib/perl/control.tar
21baaa38
MM
329
330%build
331sed -i 's:vm_db_answer_LIBDIR:VM_LIBDIR:g;s:vm_db_answer_BINDIR:VM_BINDIR:g' bin/vmware
332
333cd vmware-any-any-update%{_urel}
334chmod u+w ../lib/bin/vmware-vmx ../lib/bin-debug/vmware-vmx ../bin/vmnet-bridge
335
336%if 0
337rm -f update
338%{__cc} %{rpmldflags} %{rpmcflags} -o update update.c
339./update vmx ../lib/bin/vmware-vmx
340./update vmxdebug ../lib/bin-debug/vmware-vmx
341./update bridge ../bin/vmnet-bridge
342%endif
343cd -
344
35bca45b 345%if %{with userspace}
346 cd control-only
347 perl Makefile.PL
348 sed -i "s:^INSTALLSITEARCH.*$:INSTALLSITEARCH = %{perl_vendorarch}:" Makefile
349 sed -i "s:^INSTALLSITELIB.*$:INSTALLSITELIB = %{perl_vendorlib}:" Makefile
350 sed -i "s:^INSTALLSITEMAN1DIR.*$:INSTALLSITEMAN1DIR = %{_mandir}/man1:" Makefile
351 sed -i "s:^INSTALLSITEMAN3DIR.*$:INSTALLSITEMAN3DIR = %{_mandir}/man3:" Makefile
352
353 %{__make}
354 cd ..
355%endif
356
21baaa38
MM
357%if %{with kernel}
358cd lib/modules/source
359rm -rf built
360mkdir built
361
d3521abb 362%if !%{with kernel24}
21baaa38
MM
363for mod in vmmon vmnet ; do
364 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
365 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
366 exit 1
367 fi
368 rm -rf $mod-only
369 cp -a $mod-only.clean $mod-only
370 cd $mod-only
4be390e9 371 install -d o/include/linux
372 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
373 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
374 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
375 if grep -q "^CONFIG_PREEMPT_RT=y$" o/.config; then
376 sed -e '/pollQueueLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(pollQueueLock)/' \
377 -e '/timerLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(timerLock)/' \
378 -i ../vmmon-only/linux/driver.c
379 sed -e 's/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(vnetHubLock)/' \
380 -i ../vmnet-only/hub.c
381 sed -e 's/RW_LOCK_UNLOCKED/RW_LOCK_UNLOCKED(vnetPeerLock)/' \
382 -i ../vmnet-only/driver.c
383 fi
384 %if %{with dist_kernel}
ee18948b 385 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
4be390e9 386 %else
387 install -d o/include/config
388 touch o/include/config/MARKER
389 ln -sf %{_kernelsrcdir}/scripts o/scripts
390 %endif
21baaa38
MM
391 %{__make} -C %{_kernelsrcdir} modules \
392 VMWARE_VER=VME_V5 \
4be390e9 393 SRCROOT=$PWD \
394 M=$PWD O=$PWD/o \
21baaa38 395 VM_KBUILD=26 \
4be390e9 396 %{?with_verbose:V=1} \
397 VM_CCVER=%{_ccver}
21baaa38
MM
398 mv -f $mod.ko ../built/$mod-$cfg.ko
399 cd -
400 done
401done
402
403%else
404for mod in vmmon vmnet ; do
405 rm -rf $mod-only
406 tar xf $mod.tar
407 cd $mod-only
408 sed -i s/'^HEADER_DIR.*'/'HEADER_DIR = \/usr\/src\/linux-2.4\/include'/ Makefile
409 sed -i s/'^BUILD_DIR.*'/'BUILD_DIR = .'/ Makefile
410
411%if %{with smp}
412 %{__make} \
413 VM_KBUILD=no VMWARE_VER=VME_V5 \
414 M=$PWD O=$PWD CC=%{kgcc} \
415 INCLUDES="%{rpmcflags} -I. -D__KERNEL_SMP=1 -D__SMP__ -I%{_kernelsrcdir}/include"
416 if [ -e $mod-xxx-* ]; then
417 mv -f $mod-xxx-* ../built/$mod-smp.o
418 else
419 mv -f driver-*/$mod-xxx-* ../built/$mod-smp.o
420 fi
421
422 %{__make} VM_KBUILD=no clean
423%endif
424 %{__make} \
425 VM_KBUILD=no VMWARE_VER=VME_V5 \
426 M=$PWD O=$PWD CC=%{kgcc} \
427 INCLUDES="%{rpmcflags} -I. -I%{_kernelsrcdir}/include"
428 if [ -e $mod-xxx-* ]; then
429 mv -f $mod-xxx-* ../built/$mod.o
430 else
431 mv -f driver-*/$mod-xxx-* ../built/$mod.o
432 fi
433
434 cd ..
435done
436%endif # kernel24
437
438%endif
439
440%install
441rm -rf $RPM_BUILD_ROOT
442
443%if %{with userspace}
444install -d \
5cc7759b 445 $RPM_BUILD_ROOT%{_sysconfdir}/vmware{,-server-console} \
21baaa38
MM
446 $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/{nat,dhcpd} \
447 $RPM_BUILD_ROOT%{_bindir} \
448 $RPM_BUILD_ROOT%{_sbindir} \
a4a79c8a 449 $RPM_BUILD_ROOT%{_libdir}/vmware{,-server-console}/bin \
73b8f8bc 450 $RPM_BUILD_ROOT%{_libdir}/vmware/serverd \
21baaa38
MM
451 $RPM_BUILD_ROOT%{_mandir} \
452 $RPM_BUILD_ROOT%{_pixmapsdir} \
453 $RPM_BUILD_ROOT%{_desktopdir} \
454 $RPM_BUILD_ROOT/etc/rc.d/init.d \
a4a79c8a 455 $RPM_BUILD_ROOT/var/{log,run}/vmware
35bca45b 456
457 cd control-only
458 %{__make} install \
459 DESTDIR=$RPM_BUILD_ROOT
460 cd ..
73b8f8bc 461
462 # copy other required perl modules
463 cp -r lib/perl5/site_perl/5.005/VMware $RPM_BUILD_ROOT%{perl_vendorarch}
464 cp -r lib/perl5/site_perl/5.005/i386-linux/VMware/VmdbPerl $RPM_BUILD_ROOT%{perl_vendorarch}/VMware
465 cp -r lib/perl5/site_perl/5.005/i386-linux/VMware/{HConfig,VmdbPerl}.pm $RPM_BUILD_ROOT%{perl_vendorarch}/VMware
466 cp -r lib/perl5/site_perl/5.005/i386-linux/auto/VMware/{HConfig,VmdbPerl} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/VMware
467
468 # remove unecessary files
469 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/VMware/{HConfig,VmdbPerl,VmPerl}/.{exists,packlist}
21baaa38
MM
470%endif
471
472%if %{with kernel}
473install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
474
475#cd vmware-any-any-update%{_urel}
476cd lib/modules/source
477
d3521abb 478%if !%{with kernel24}
21baaa38
MM
479install built/vmmon-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
480 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmmon.ko
481install built/vmnet-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
482 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmnet.ko
483%if %{with smp} && %{with dist_kernel}
484install built/vmmon-smp.ko \
485 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vmmon.ko
486install built/vmnet-smp.ko \
487 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vmnet.ko
488%endif
489
490%else
491install built/vmmon.o \
492 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmmon.o
493install built/vmnet.o \
494 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vmnet.o
495%if %{with smp} && %{with dist_kernel}
496install built/vmmon-smp.o \
497 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vmmon.o
498install built/vmnet-smp.o \
499 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vmnet.o
500%endif
501
502%endif
503
504cd -
505%endif
506
507%if %{with userspace}
508install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vmnet
509install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet.conf
510install %{SOURCE5} $RPM_BUILD_ROOT%{_pixmapsdir}
511install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
512install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/nat/nat.conf
513install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
514
515touch $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases
516touch $RPM_BUILD_ROOT%{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases~
517
518install bin/*-* $RPM_BUILD_ROOT%{_bindir}
519install sbin/*-* $RPM_BUILD_ROOT%{_sbindir}
a4a79c8a 520install lib/bin/vmware-vmx $RPM_BUILD_ROOT%{_libdir}/vmware/bin
21baaa38 521
73b8f8bc 522sed -e ' s@%sitearch%@%{perl_sitearch}@g; s@%sitelib%@%{perl_sitelib}@g; s@%vendorarch%@%{perl_vendorarch}@g; s@%vendorlib%@%{perl_vendorlib}@g; s@%archlib%@%{perl_archlib}@g; s@%privlib%@%{perl_privlib}@g;' < lib/serverd/init.pl.default > $RPM_BUILD_ROOT%{_libdir}/vmware/serverd/init.pl
523
21baaa38 524#cp -r lib/{bin-debug,config,help*,isoimages,licenses,messages,smb,xkeymap} \
a4a79c8a 525cp -r lib/{bin-debug,config,help*,isoimages,licenses,messages,share,xkeymap} \
526 $RPM_BUILD_ROOT%{_libdir}/vmware
21baaa38 527
a4a79c8a 528cp -r vmware-server-console-distrib/lib/{bin-debug,config,help*,messages,share,xkeymap} \
5cc7759b 529 $RPM_BUILD_ROOT%{_libdir}/vmware-server-console
21baaa38 530
5cc7759b 531install vmware-server-console-distrib/lib/bin/vmware-remotemks $RPM_BUILD_ROOT%{_libdir}/vmware-server-console/bin
21baaa38 532
5cc7759b 533cp -r vmware-server-console-distrib/man/* man/* $RPM_BUILD_ROOT%{_mandir}
21baaa38
MM
534gunzip $RPM_BUILD_ROOT%{_mandir}/man?/*.gz
535
5cc7759b 536cat > $RPM_BUILD_ROOT%{_sysconfdir}/vmware-server-console/locations <<EOF
21baaa38 537VM_BINDIR=%{_bindir}
5cc7759b 538VM_LIBDIR=%{_libdir}/vmware-server-console
21baaa38
MM
539EOF
540
541%if %{with internal_libs}
542install bin/vmware $RPM_BUILD_ROOT%{_bindir}
a4a79c8a 543install lib/bin/vmware $RPM_BUILD_ROOT%{_libdir}/vmware/bin
544cp -r lib/lib $RPM_BUILD_ROOT%{_libdir}/vmware
21baaa38 545
5cc7759b 546install vmware-server-console-distrib/bin/vmware-server-console $RPM_BUILD_ROOT%{_bindir}
547install vmware-server-console-distrib/lib/bin/vmware $RPM_BUILD_ROOT%{_libdir}/vmware-server-console/bin
548cp -r vmware-server-console-distrib/lib/lib $RPM_BUILD_ROOT%{_libdir}/vmware-server-console
21baaa38
MM
549%else
550install lib/bin/vmware $RPM_BUILD_ROOT%{_bindir}
5cc7759b 551install vmware-server-console-distrib/lib/bin/vmware-server-console $RPM_BUILD_ROOT%{_bindir}
21baaa38
MM
552%endif
553%endif
554
21baaa38
MM
555%clean
556rm -rf $RPM_BUILD_ROOT
557
558%post networking
559/sbin/chkconfig --add vmnet
ad4726ec 560%service vmnet restart "VMware networking service"
21baaa38
MM
561
562%preun networking
563if [ "$1" = "0" ]; then
ad4726ec 564 %service vmnet stop
21baaa38
MM
565 /sbin/chkconfig --del vmnet
566fi
567
568%post -n kernel-misc-vmmon
569%depmod %{_kernel_ver}
570
571%postun -n kernel-misc-vmmon
572%depmod %{_kernel_ver}
573
574%post -n kernel-misc-vmnet
575%depmod %{_kernel_ver}
576
577%postun -n kernel-misc-vmnet
578%depmod %{_kernel_ver}
579
580%post -n kernel-smp-misc-vmmon
581%depmod %{_kernel_ver}smp
582
583%postun -n kernel-smp-misc-vmmon
584%depmod %{_kernel_ver}smp
585
586%post -n kernel-smp-misc-vmnet
587%depmod %{_kernel_ver}smp
588
589%postun -n kernel-smp-misc-vmnet
590%depmod %{_kernel_ver}smp
591
592%post -n kernel24-misc-vmmon
593%depmod %{_kernel_ver}
594
595%postun -n kernel24-misc-vmmon
596%depmod %{_kernel_ver}
597
598%post -n kernel24-misc-vmnet
599%depmod %{_kernel_ver}
600
601%postun -n kernel24-misc-vmnet
602%depmod %{_kernel_ver}
603
604%post -n kernel24-smp-misc-vmmon
605%depmod %{_kernel_ver}smp
606
607%postun -n kernel24-smp-misc-vmmon
608%depmod %{_kernel_ver}smp
609
610%post -n kernel24-smp-misc-vmnet
611%depmod %{_kernel_ver}smp
612
613%postun -n kernel24-smp-misc-vmnet
614%depmod %{_kernel_ver}smp
615
616%if %{with userspace}
617%files
618%defattr(644,root,root,755)
619%doc doc/* lib/configurator/vmnet-{dhcpd,nat}.conf
620%dir %{_sysconfdir}/vmware
21baaa38
MM
621%attr(755,root,root) %{_bindir}/vm-support
622%attr(755,root,root) %{_bindir}/vmware-authtrusted
623%attr(755,root,root) %{_bindir}/vmware-cmd
624%attr(755,root,root) %{_bindir}/vmware
625%attr(755,root,root) %{_bindir}/vmware-loop
626%attr(755,root,root) %{_bindir}/vmware-mount.pl
627%attr(755,root,root) %{_bindir}/vmware-vdiskmanager
628%attr(755,root,root) %{_sbindir}/*
a4a79c8a 629%dir %{_libdir}/vmware
630%dir %{_libdir}/vmware/bin
21baaa38 631# warning: SUID !!!
a4a79c8a 632%attr(4755,root,root) %{_libdir}/vmware/bin/vmware-vmx
633%{_libdir}/vmware/config
634%{_libdir}/vmware/isoimages
21baaa38 635%if %{with internal_libs}
a4a79c8a 636%attr(755,root,root) %{_libdir}/vmware/bin/vmware
637%{_libdir}/vmware/lib
638%attr(755,root,root) %{_libdir}/vmware/lib/wrapper-gtk24.sh
21baaa38 639%endif
73b8f8bc 640%dir %{_libdir}/vmware/serverd
641%attr(750,root,root) %{_libdir}/vmware/serverd/init.pl
a4a79c8a 642%{_libdir}/vmware/licenses
643%dir %{_libdir}/vmware/messages
644%{_libdir}/vmware/messages/en
645%lang(ja) %{_libdir}/vmware/messages/ja
646%{_libdir}/vmware/share
647%{_libdir}/vmware/xkeymap
21baaa38 648%{_mandir}/man1/vmware.1*
35bca45b 649%{_mandir}/man3/*
650%{perl_vendorarch}/VMware
651%{perl_vendorarch}/auto/VMware
21baaa38 652%attr(1777,root,root) %dir /var/run/vmware
a4a79c8a 653%attr(751,root,root) %dir /var/log/vmware
21baaa38
MM
654%{_pixmapsdir}/*.png
655%{_desktopdir}/%{name}.desktop
656
657%files console
3c34bc99 658%defattr(644,root,root,755)
5cc7759b 659%dir %{_sysconfdir}/vmware-server-console
660%{_sysconfdir}/vmware-server-console/locations
661%attr(755,root,root) %{_bindir}/vmware-server-console
662%dir %{_libdir}/vmware-server-console
663%dir %{_libdir}/vmware-server-console/bin
664%attr(755,root,root) %{_libdir}/vmware-server-console/bin/vmware-remotemks
665%{_libdir}/vmware-server-console/config
21baaa38 666%if %{with internal_libs}
5cc7759b 667%attr(755,root,root) %{_libdir}/vmware-server-console/bin/vmware
668%{_libdir}/vmware-server-console/lib
669%attr(755,root,root) %{_libdir}/vmware-server-console/lib/wrapper-gtk24.sh
21baaa38 670%endif
5cc7759b 671%dir %{_libdir}/vmware-server-console/messages
672#%{_libdir}/vmware-server-console/messages/en
673%lang(ja) %{_libdir}/vmware-server-console/messages/ja
674%{_libdir}/vmware-server-console/share
675%{_libdir}/vmware-server-console/xkeymap
676%{_mandir}/man1/vmware-server-console.1*
21baaa38
MM
677
678%files console-help
679%defattr(644,root,root,755)
5cc7759b 680%{_libdir}/vmware-server-console/help*
21baaa38
MM
681
682%files debug
683%defattr(644,root,root,755)
a4a79c8a 684%dir %{_libdir}/vmware/bin-debug
21baaa38 685# warning: SUID !!!
a4a79c8a 686%attr(4755,root,root) %{_libdir}/vmware/bin-debug/vmware-vmx
5cc7759b 687%dir %{_libdir}/vmware-server-console/bin-debug
a4a79c8a 688%attr(755,root,root) %{_libdir}/vmware/bin-debug/vmware-remotemks
5cc7759b 689%attr(755,root,root) %{_libdir}/vmware-server-console/bin-debug/vmware-remotemks
21baaa38
MM
690
691%files help
692%defattr(644,root,root,755)
a4a79c8a 693%{_libdir}/vmware/help*
21baaa38
MM
694
695%files networking
696%defattr(644,root,root,755)
697%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet.conf
698%attr(754,root,root) /etc/rc.d/init.d/vmnet
699%attr(755,root,root) %{_bindir}/vmnet-bridge
700%attr(755,root,root) %{_bindir}/vmnet-dhcpd
701%attr(755,root,root) %{_bindir}/vmnet-natd
702%attr(755,root,root) %{_bindir}/vmnet-netifup
703%attr(755,root,root) %{_bindir}/vmnet-sniffer
704%attr(755,root,root) %{_bindir}/vmware-ping
705%dir %{_sysconfdir}/vmware/vmnet8
706%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.conf
707%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/nat/nat.conf
708%verify(not md5 mtime size) %{_sysconfdir}/vmware/vmnet8/dhcpd/dhcpd.leases*
709
710%if 0
711%files samba
712%defattr(644,root,root,755)
713%doc lib/configurator/vmnet-smb.conf
714%attr(755,root,root) %{_bindir}/vmware-nmbd
715%attr(755,root,root) %{_bindir}/vmware-smbd
716%attr(755,root,root) %{_bindir}/vmware-smbpasswd
717%attr(755,root,root) %{_bindir}/vmware-smbpasswd.bin
718%{_libdir}/vmware/smb
719%endif
720%endif
721
722%if %{with kernel}
d3521abb 723%if !%{with kernel24}
21baaa38
MM
724%files -n kernel-misc-vmmon
725%defattr(644,root,root,755)
726/lib/modules/%{_kernel_ver}/misc/vmmon.ko*
727
728%files -n kernel-misc-vmnet
729%defattr(644,root,root,755)
730/lib/modules/%{_kernel_ver}/misc/vmnet.ko*
731
732%if %{with smp} && %{with dist_kernel}
733%files -n kernel-smp-misc-vmmon
734%defattr(644,root,root,755)
735/lib/modules/%{_kernel_ver}smp/misc/vmmon.ko*
736
737%files -n kernel-smp-misc-vmnet
738%defattr(644,root,root,755)
739/lib/modules/%{_kernel_ver}smp/misc/vmnet.ko*
740%endif
741
742%else
743%files -n kernel24-misc-vmmon
744%defattr(644,root,root,755)
745/lib/modules/%{_kernel_ver}/misc/vmmon.o*
746
747%files -n kernel24-misc-vmnet
748%defattr(644,root,root,755)
749/lib/modules/%{_kernel_ver}/misc/vmnet.o*
750
751%if %{with smp} && %{with dist_kernel}
752%files -n kernel24-smp-misc-vmmon
753%defattr(644,root,root,755)
754/lib/modules/%{_kernel_ver}smp/misc/vmmon.o*
755
756%files -n kernel24-smp-misc-vmnet
757%defattr(644,root,root,755)
758/lib/modules/%{_kernel_ver}smp/misc/vmnet.o*
759%endif
760
761%endif
762
763%endif
This page took 0.153432 seconds and 4 git commands to generate.