]> git.pld-linux.org Git - packages/VMware-server.git/blobdiff - VMware-server.spec
- more NoSource tags
[packages/VMware-server.git] / VMware-server.spec
index 75d70484b1f1a222c4fb5c68f76ed86b43dc7f3d..db57ec5311224b36e42493784ec8eb2e6dcb7449 100644 (file)
@@ -2,13 +2,13 @@
 # This doesn't work at all yet. I don't know if the management interface is needed
 # (bundling apache seems like a sooooooooo great idea). Maybe it is possible to
 # setup the server part by hand. The perl module in perl/control.tar needs to
-# be packaged (vmware-cmd requires that). Something needs to be done with 
+# be packaged (vmware-cmd requires that). Something needs to be done with
 # the authd (inetd integration is needed I guess).
-# 
+#
 # The modules from any-any upgrade are too old (I used the ones comming with VMw-S).
 #
 # It builds on amd64, I have changed the networking package not to require the main package
-# so it can be installed outside 32bit chroot. 
+# so it can be installed outside 32bit chroot.
 #
 # But hey, it's at least free ;-)
 #
 %endif
 #
 %define                _ver    e.x.p
-%define                _build  20925
-%define                _rel    1
-%define                _urel   98
+%define                _build  22874
+%define                _rel    0.3
+%define                _urel   101
+%define                _ccver  %(rpm -q --qf "%{VERSION}" gcc)
 #
 Summary:       VMware Server
 Summary(pl):   VMware Server - wirtualna platforma dla stacji roboczej
@@ -42,11 +43,11 @@ Release:    %{_rel}
 License:       custom, non-distributable
 Group:         Applications/Emulators
 Source0:       http://download3.vmware.com/software/vmserver/%{name}-%{_ver}-%{_build}.tar.gz
-# NoSource0-md5:       91821fc2649749911f0e2d0ca37b3eb8
+# NoSource0-md5:       3ef78e4deb44e51e99043e008c5a0e90
 Source1:       http://download3.vmware.com/software/vmserver/VMware-mui-%{_ver}-%{_build}.tar.gz
-# NoSource1-md5:       91821fc2649749911f0e2d0ca37b3eb8
+# NoSource1-md5:       4666688c7f1782022b55618f3cd620e8
 Source2:       http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update%{_urel}.tar.gz
-# Source2-md5: 3c5f275d57a812276eec8446b94afd53
+# NoSource2-md5:       b3ce457f5b9ae8b606fd70f56084877d
 Source3:       %{name}.init
 Source4:       %{name}-vmnet.conf
 Source5:       %{name}.png
@@ -56,11 +57,13 @@ Source8:    %{name}-dhcpd.conf
 Patch0:                %{name}-Makefile.patch
 Patch1:                %{name}-run_script.patch
 NoSource:      0
+NoSource:      1
+NoSource:      2
 URL:           http://www.vmware.com/
 BuildRequires: gcc-c++
-%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 2.6.7}
+%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 3:2.6.7}
 BuildRequires: rpm-perlprov
-BuildRequires: rpmbuild(macros) >= 1.217
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
 Requires:      kernel(vmmon) = %{version}-%{_rel}
 Requires:      libgnomecanvasmm
@@ -70,9 +73,9 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _noautoprovfiles %{_libdir}/vmware*/lib/.*\.so.*
 
 %description
-VMware Server Virtual Platform is a thin software layer that
-allows multiple guest operating systems to run concurrently on a
-single standard PC, without repartitioning or rebooting, and without
+VMware Server Virtual Platform is a thin software layer that allows
+multiple guest operating systems to run concurrently on a single
+standard PC, without repartitioning or rebooting, and without
 significant loss of performance.
 
 %description -l pl
@@ -135,8 +138,10 @@ Pliki pomocy dla konsoli VMware Server.
 Summary:       VMware networking utilities
 Summary(pl):   Narzêdzia VMware do obs³ugi sieci
 Group:         Applications/Emulators
+Requires(post,preun):  /sbin/chkconfig
 #Requires:     %{name} = %{version}-%{release}
 Requires:      kernel(vmnet) = %{version}-%{_rel}
+Requires:      rc-scripts
 
 %description networking
 VMware networking utilities.
@@ -320,6 +325,7 @@ cp -a vmmon-only{,.clean}
 cp -a vmnet-only{,.clean}
 cd -
 %patch1 -p1
+tar xf lib/perl/control.tar
 
 %build
 sed -i 's:vm_db_answer_LIBDIR:VM_LIBDIR:g;s:vm_db_answer_BINDIR:VM_BINDIR:g' bin/vmware
@@ -336,6 +342,18 @@ rm -f update
 %endif
 cd -
 
+%if %{with userspace}
+       cd control-only
+       perl Makefile.PL
+       sed -i "s:^INSTALLSITEARCH.*$:INSTALLSITEARCH = %{perl_vendorarch}:" Makefile
+       sed -i "s:^INSTALLSITELIB.*$:INSTALLSITELIB = %{perl_vendorlib}:" Makefile
+       sed -i "s:^INSTALLSITEMAN1DIR.*$:INSTALLSITEMAN1DIR = %{_mandir}/man1:" Makefile
+       sed -i "s:^INSTALLSITEMAN3DIR.*$:INSTALLSITEMAN3DIR = %{_mandir}/man3:" Makefile
+
+       %{__make}
+       cd ..
+%endif
+
 %if %{with kernel}
 cd lib/modules/source
 rm -rf built
@@ -350,18 +368,33 @@ for mod in vmmon vmnet ; do
                rm -rf $mod-only
                cp -a $mod-only.clean $mod-only
                cd $mod-only
-               install -d include/{linux,config}
-               touch include/config/MARKER
-               ln -sf %{_kernelsrcdir}/config-$cfg .config
-               ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
-               ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
-               ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm-%{_target_base_arch}
-               ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
+               install -d o/include/linux
+               ln -sf %{_kernelsrcdir}/config-$cfg o/.config
+               ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
+               ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
+       if grep -q "^CONFIG_PREEMPT_RT=y$" o/.config; then
+               sed -e '/pollQueueLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(pollQueueLock)/' \
+                       -e '/timerLock/s/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(timerLock)/' \
+                       -i ../vmmon-only/linux/driver.c
+               sed -e 's/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(vnetHubLock)/' \
+                       -i ../vmnet-only/hub.c
+               sed -e 's/RW_LOCK_UNLOCKED/RW_LOCK_UNLOCKED(vnetPeerLock)/' \
+                       -i ../vmnet-only/driver.c
+       fi
+       %if %{with dist_kernel}
+               %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
+       %else
+               install -d o/include/config
+               touch o/include/config/MARKER
+               ln -sf %{_kernelsrcdir}/scripts o/scripts
+               %endif
                %{__make} -C %{_kernelsrcdir} modules \
                        VMWARE_VER=VME_V5 \
-                       M=$PWD O=$PWD \
+                       SRCROOT=$PWD \
+                       M=$PWD O=$PWD/o \
                        VM_KBUILD=26 \
-                       %{?with_verbose:V=1}
+                       %{?with_verbose:V=1} \
+                       VM_CCVER=%{_ccver}
                mv -f $mod.ko ../built/$mod-$cfg.ko
                cd -
        done
@@ -420,6 +453,11 @@ install -d \
        $RPM_BUILD_ROOT%{_desktopdir} \
        $RPM_BUILD_ROOT/etc/rc.d/init.d \
        $RPM_BUILD_ROOT/var/run/vmware
+
+       cd control-only
+       %{__make} install \
+               DESTDIR=$RPM_BUILD_ROOT
+       cd ..
 %endif
 
 %if %{with kernel}
@@ -473,10 +511,10 @@ install sbin/*-* $RPM_BUILD_ROOT%{_sbindir}
 install lib/bin/vmware-vmx $RPM_BUILD_ROOT%{_libdir}/vmware-server/bin
 
 #cp -r lib/{bin-debug,config,help*,isoimages,licenses,messages,smb,xkeymap} \
-cp -r  lib/{bin-debug,config,help*,isoimages,licenses,messages,xkeymap} \
+cp -r  lib/{bin-debug,config,help*,isoimages,licenses,messages,xkeymap,share} \
        $RPM_BUILD_ROOT%{_libdir}/vmware-server
 
-cp -r  vmware-console-distrib/lib/{bin-debug,config,help*,messages,xkeymap} \
+cp -r  vmware-console-distrib/lib/{bin-debug,config,help*,messages,xkeymap,share} \
        $RPM_BUILD_ROOT%{_libdir}/vmware-console
 
 install vmware-console-distrib/lib/bin/vmware-remotemks $RPM_BUILD_ROOT%{_libdir}/vmware-console/bin
@@ -508,23 +546,16 @@ install vmware-console-distrib/lib/bin/vmware-console $RPM_BUILD_ROOT%{_bindir}
 %endif
 %endif
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post networking
 /sbin/chkconfig --add vmnet
-if [ -r /var/lock/subsys/vmnet ]; then
-       /etc/rc.d/init.d/vmnet restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/vmnet start\" to start VMware networking service."
-fi
+%service vmnet restart "VMware networking service"
 
 %preun networking
 if [ "$1" = "0" ]; then
-       if [ -r /var/lock/subsys/vmnet ]; then
-               /etc/rc.d/init.d/vmnet stop >&2
-       fi
+       %service vmnet stop
        /sbin/chkconfig --del vmnet
 fi
 
@@ -605,13 +636,18 @@ fi
 %dir %{_libdir}/vmware-server/messages
 %{_libdir}/vmware-server/messages/en
 %lang(ja) %{_libdir}/vmware-server/messages/ja
+%{_libdir}/vmware-server/share
 %{_libdir}/vmware-server/xkeymap
 %{_mandir}/man1/vmware.1*
+%{_mandir}/man3/*
+%{perl_vendorarch}/VMware
+%{perl_vendorarch}/auto/VMware
 %attr(1777,root,root) %dir /var/run/vmware
 %{_pixmapsdir}/*.png
 %{_desktopdir}/%{name}.desktop
 
 %files console
+%defattr(644,root,root,755)
 %dir %{_sysconfdir}/vmware-console
 %{_sysconfdir}/vmware-console/locations
 %attr(755,root,root) %{_bindir}/vmware-console
@@ -625,7 +661,9 @@ fi
 %attr(755,root,root) %{_libdir}/vmware-console/lib/wrapper-gtk24.sh
 %endif
 %dir %{_libdir}/vmware-console/messages
+#%{_libdir}/vmware-console/messages/en
 %lang(ja) %{_libdir}/vmware-console/messages/ja
+%{_libdir}/vmware-console/share
 %{_libdir}/vmware-console/xkeymap
 %{_mandir}/man1/vmware-console.1*
 
This page took 0.085154 seconds and 4 git commands to generate.