X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=VirtualBox.spec;h=b84ee6ea2b8f3555552946a284ecdf1875f108c1;hb=refs%2Ftags%2Fauto%2Fth%2FVirtualBox-4.2.12-12;hp=2a22864f02b47e5fdac112023531d47fa589de69;hpb=22380dc790925b8fd83ef4f4d0d413a81f5e6257;p=packages%2FVirtualBox.git diff --git a/VirtualBox.spec b/VirtualBox.spec index 2a22864..b84ee6e 100644 --- a/VirtualBox.spec +++ b/VirtualBox.spec @@ -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 12 %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,12 +289,22 @@ 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 # NOTE: '#' in url is lost because rpm treats it as comment, even hacking with # macros doesn't help as rpmbuild takes final result to parse URL: http://www.virtualbox.org/manual/ch09.html#autologon_unix_lightdm +Requires: kernel%{_alt_kernel}-misc-vboxguest Requires: lightdm >= 1.0.1 Provides: lightdm-greeter @@ -558,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}" \ @@ -573,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} @@ -675,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 @@ -787,12 +800,15 @@ fi /sbin/chkconfig --add vboxservice %service vboxservice restart -%postun guest +%preun guest if [ "$1" = "0" ]; then /sbin/chkconfig --del vboxservice %service vboxservice -q stop fi +%pre -n lightdm-greeter-vbox +%addusertogroup xdm vbox + %post -n kernel%{_alt_kernel}-misc-vboxdrv %depmod %{_kernel_ver} %vbox_kernel_post -d vboxdrv VirtualBox Support Driver @@ -1052,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)