# 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)
%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
%{?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
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
# 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}" \
%{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}
%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
/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
%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)