%define pname VirtualBox
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
%define pname VirtualBox
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
License: GPL v2
Group: Applications/Emulators
Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
License: GPL v2
Group: Applications/Emulators
Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2
Source2: vboxservice.init
Source3: vboxservice.service
Source4: vboxservice.sysconfig
Source2: vboxservice.init
Source3: vboxservice.service
Source4: vboxservice.sysconfig
Requires: %{name}-guest = %{version}-%{release}
Requires: xorg-app-xrandr
Requires: xorg-driver-video-vboxvideo = %{version}-%{release}
Requires: %{name}-guest = %{version}-%{release}
Requires: xorg-app-xrandr
Requires: xorg-driver-video-vboxvideo = %{version}-%{release}
Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie
Group: X11/Applications
Requires: Mesa-dri-driver-swrast
Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie
Group: X11/Applications
Requires: Mesa-dri-driver-swrast
Requires: xorg-xserver-libdri >= 1.7.4
Requires: xorg-xserver-server >= 1.0.99.901
%{?requires_xorg_xserver_videodrv}
Provides: OpenGL = 2.1
Provides: OpenGL-GLX = 1.3
Requires: xorg-xserver-libdri >= 1.7.4
Requires: xorg-xserver-server >= 1.0.99.901
%{?requires_xorg_xserver_videodrv}
Provides: OpenGL = 2.1
Provides: OpenGL-GLX = 1.3
%{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
%{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
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
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
# XXX: where else to install them that vboxvideo_dri.so finds them? patch with rpath?
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxEGL.so
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLarrayspu.so
# XXX: where else to install them that vboxvideo_dri.so finds them? patch with rpath?
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxEGL.so
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLarrayspu.so
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname},/lib/udev}/VBoxCreateUSBNode.sh
cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/udev/rules.d/60-vboxdrv.rules
%{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname},/lib/udev}/VBoxCreateUSBNode.sh
cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/udev/rules.d/60-vboxdrv.rules
%files -n xorg-driver-video-vboxvideo
%defattr(644,root,root,755)
%files -n xorg-driver-video-vboxvideo
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/xorg/modules/dri/vboxvideo_dri.so
# vboxvideo_dri.so deps
%attr(755,root,root) %{_libdir}/VBoxEGL.so
%attr(755,root,root) %{_libdir}/xorg/modules/dri/vboxvideo_dri.so
# vboxvideo_dri.so deps
%attr(755,root,root) %{_libdir}/VBoxEGL.so