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