]> git.pld-linux.org Git - packages/VirtualBox.git/blobdiff - VirtualBox.spec
- release 16 (by relup.sh)
[packages/VirtualBox.git] / VirtualBox.spec
index 53a6b282bff2876080544286c4817223eef63e90..edb32d00fa78c3a08507fc8f7cef681c48185ee0 100644 (file)
@@ -1,20 +1,19 @@
 # TODO
 # - java bindings
 # - Package SDK.
-# - Package utils (and write initscripts ?) for Guest OS.
 # - Check License of VBoxGuestAdditions_*.iso, it's probably not GPL v2.
 #   If so check if it is distributable.
-# - resolve mess with subpackages?
-#   - addtions: iso (containing additions/*.iso)
-#   - guest: to be installed to guests (deps on x11 drivers)
+# - guest x11 additions: currently incomplete/untested
 # - enable VDE networking: --enable-vde
+# - initscripts for webservice
+# - install systemd vboxservice.service
 #
 # Conditional build:
 %bcond_without doc             # don't build the documentation
 %bcond_without dist_kernel     # without distribution kernel
 %bcond_without kernel          # don't build kernel module
 %bcond_without userspace       # don't build userspace package
-%bcond_with    webservice      # webservice (soap) support
+%bcond_with    webservice      # webservice (SOAP) support
 %bcond_without lightdm # lightdm greeter
 %bcond_without verbose
 %bcond_with    force_userspace # force userspace build (useful if alt_kernel is set)
@@ -33,7 +32,7 @@
 %define                _enable_debug_packages  0
 %endif
 
-%define                rel             8
+%define                rel             16
 %define                pname           VirtualBox
 Summary:       VirtualBox - x86 hardware virtualizer
 Summary(pl.UTF-8):     VirtualBox - wirtualizator sprzętu x86
@@ -108,6 +107,7 @@ BuildRequires:      device-mapper-devel
 %{?with_doc:BuildRequires:     docbook-dtd44-xml}
 BuildRequires: gcc >= 5:3.2.3
 %{?with_webservice:BuildRequires:      gsoap-devel}
+BuildRequires: issue
 BuildRequires: kBuild >= 0.1.9998-2
 BuildRequires: libIDL-devel
 BuildRequires: libcap-static
@@ -289,6 +289,15 @@ X.org X11 video and mouse drivers
 
 You should install this package in your Guest OS for X11 session.
 
+%package webservice
+Summary:       VirtualBox Web Service
+Group:         Applications/Emulators
+Requires:      %{name} = %{version}-%{release}
+
+%description webservice
+This package contains VirtualBox web service API daemon. It allows to
+control virtual machines via web interface.
+
 %package -n lightdm-greeter-vbox
 Summary:       VirtualBox greeter for lightdm
 Group:         Themes
@@ -559,9 +568,25 @@ cd -
 # using system kBuild package
 %{__rm} -r kBuild
 
+cat <<'EOF'>> LocalConfig.kmk
+%{?with_verbose:KBUILD_VERBOSE=3}
+USERNAME=%(id -un)
+__VBOX_BUILD_PUBLISHER=_PLD
+VBOX_VERSION_STRING=$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)_PLD
+XSERVER_VERSION=%(rpm -q --queryformat '%{V}\n' xorg-xserver-server-devel | awk -F. '{ print $1 $2 }' 2>/dev/null || echo ERROR)
+VBOX_USE_SYSTEM_XORG_HEADERS=1
+%if %{with lightdm}
+VBOX_WITH_LIGHTDM_GREETER=1
+VBOX_WITH_LIGHTDM_GREETER_PACKING=1
+%endif
+TOOL_GCC3_CFLAGS=%{rpmcflags}
+TOOL_GCC3_CXXFLAGS=%{rpmcxxflags}
+VBOX_GCC_OPT=%{rpmcxxflags}
+VBOX_WITH_TESTCASES=
+EOF
+
 %build
 %if %{with userspace}
-echo "VBOX_WITH_TESTCASES := " > LocalConfig.kmk
 ./configure \
        --with-gcc="%{__cc}" \
        --with-g++="%{__cxx}" \
@@ -574,20 +599,7 @@ echo "VBOX_WITH_TESTCASES := " > LocalConfig.kmk
        %{nil}
 
 XSERVER_VERSION=$(rpm -q --queryformat '%{VERSION}\n' xorg-xserver-server-devel | awk -F. ' { print $1 $2 } ' 2> /dev/null || echo ERROR)
-kmk %{?_smp_mflags} \
-       %{?with_verbose:KBUILD_VERBOSE=3} \
-       USER=%(id -un) \
-       VBOX_VERSION_STRING='$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)'_PLD \
-       XSERVER_VERSION="$XSERVER_VERSION" \
-       VBOX_USE_SYSTEM_XORG_HEADERS=1 \
-%if %{with lightdm}
-       VBOX_WITH_LIGHTDM_GREETER=1 \
-       VBOX_WITH_LIGHTDM_GREETER_PACKING=1 \
-%endif
-       TOOL_GCC3_CFLAGS="%{rpmcflags}" \
-       TOOL_GCC3_CXXFLAGS="%{rpmcxxflags}" \
-       VBOX_GCC_OPT="%{rpmcxxflags}" \
-       %{nil}
+kmk %{?_smp_mflags}
 %endif
 
 %if %{with kernel}
@@ -676,7 +688,7 @@ cp -p src/VBox/Additions/x11/Installer/vboxclient.desktop \
 
 %if %{with lightdm}
 install -d $RPM_BUILD_ROOT%{_datadir}/xgreeters
-install -p %{objdir}/vbox-greeter/vbox-greeter $RPM_BUILD_ROOT%{_sbindir}
+%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_sbindir}}/vbox-greeter
 cp -p %{objdir}/Additions/Installer/linux/share/VBoxGuestAdditions/vbox-greeter.desktop $RPM_BUILD_ROOT%{_datadir}/xgreeters
 %endif
 
@@ -788,7 +800,7 @@ fi
 /sbin/chkconfig --add vboxservice
 %service vboxservice restart
 
-%postun guest
+%preun guest
 if [ "$1" = "0" ]; then
        /sbin/chkconfig --del vboxservice
        %service vboxservice -q stop
@@ -1056,6 +1068,13 @@ fi
 %attr(755,root,root) %{_libdir}/%{pname}/additions/vboxadd-service
 %attr(755,root,root) %{_libdir}/%{pname}/additions/vboxadd-x11
 
+%if %{with webservice}
+%files webservice
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{pname}/vboxwebsrv
+%attr(755,root,root) %{_libdir}/%{pname}/webtest
+%endif
+
 %if %{with lightdm}
 %files -n lightdm-greeter-vbox
 %defattr(644,root,root,755)
This page took 0.045117 seconds and 4 git commands to generate.