diff --git a/srcpkgs/virtualbox-ose/INSTALL b/srcpkgs/virtualbox-ose/INSTALL index a90cf9c3039..9c137d1f2e2 100644 --- a/srcpkgs/virtualbox-ose/INSTALL +++ b/srcpkgs/virtualbox-ose/INSTALL @@ -1,11 +1,18 @@ case "${ACTION}" in post) - echo "============================================================" - echo "To use VirtualBox the following modules should be loaded:" - echo " vboxdrv, vboxnetadp, vboxnetflt" - echo - echo "You can load them at boot in /etc/conf.d/modules, like:" - echo " modules=\"vboxdrv vboxnetadp vboxnetflt\"" - echo "============================================================" + cat <<_EOF +================================================================= + +To use VirtualBox the following modules should be loaded: + vboxdrv, vboxnetadp, vboxnetflt + +You can load them at boot in /etc/conf.d/modules, like: + modules="vboxdrv vboxnetadp vboxnetflt" + +You should also add your user to the 'vboxusers' group to be able +to use some VirtualBox features, e.g USB. + +================================================================== +_EOF ;; esac diff --git a/srcpkgs/virtualbox-ose/files/virtualbox-ose-dkms.udev b/srcpkgs/virtualbox-ose/files/virtualbox-ose-dkms.udev index a075da87fbf..0c3d8bc3740 100644 --- a/srcpkgs/virtualbox-ose/files/virtualbox-ose-dkms.udev +++ b/srcpkgs/virtualbox-ose/files/virtualbox-ose-dkms.udev @@ -1 +1,5 @@ KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" +SUBSYSTEM=="usb_device", ACTION=="add", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" +SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" diff --git a/srcpkgs/virtualbox-ose/template b/srcpkgs/virtualbox-ose/template index 0aac0e67e72..1cb76c96efe 100644 --- a/srcpkgs/virtualbox-ose/template +++ b/srcpkgs/virtualbox-ose/template @@ -1,6 +1,7 @@ # Template file for 'virtualbox-ose' pkgname=virtualbox-ose version=4.0.0 +revision=1 wrksrc="VirtualBox-${version}_OSE" distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2" build_style=custom-install @@ -11,6 +12,7 @@ long_desc=" VirtualBox is a free x86 virtualization solution allowing a wide range of x86 operating systems such as Windows, DOS, BSD or Linux to run on a Linux system." +system_groups="vboxusers" gtk_iconcache_dirs="/usr/share/icons/hicolor" subpackages="${pkgname}-dkms ${pkgname}-guest ${pkgname}-guest-dkms" @@ -61,6 +63,7 @@ Add_dependency build acpica-utils Add_dependency build kernel-headers Add_dependency build dev86 Add_dependency build makeself +Add_dependency build cdrtools if [ "${xbps_machine}" = "x86_64" ]; then Add_dependency build gcc-c++-multilib fi @@ -103,7 +106,7 @@ do_install() install -m0644 *.gc *.r0 VBoxEFI* ${DESTDIR}/usr/lib/virtualbox install -m4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl \ VirtualBox VBoxBFE -t ${DESTDIR}/usr/lib/virtualbox - install -m0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxSysInfo.sh xpidl \ + install -m0755 VBoxManage VBoxSVC VBoxXPCOMIPCD *.sh xpidl \ VBoxTestOGL EfiThunk *.py -t ${DESTDIR}/usr/lib/virtualbox install -m0755 nls/*.qm -t ${DESTDIR}/usr/share/virtualbox/nls @@ -141,6 +144,7 @@ do_install() mkdir -p ${_osedir} cp -a . ${_osedir} + rm -f ${_osedir}/do_dkms install -m644 ${FILESDIR}/${pkgname}-dkms.dkms ${_osedir}/dkms.conf mkdir -p ${DESTDIR}/lib/udev/rules.d @@ -179,6 +183,7 @@ do_install() local _guestdir=${DESTDIR}/usr/src/${pkgname}-guest-${version} cp -a . ${_guestdir} + rm -f ${_guestdir}/do_dkms install -m644 ${FILESDIR}/${pkgname}-guest-dkms.dkms \ ${_guestdir}/dkms.conf install -m644 ${FILESDIR}/${pkgname}-guest-dkms.udev \ diff --git a/srcpkgs/virtualbox-ose/virtualbox-ose-dkms.template b/srcpkgs/virtualbox-ose/virtualbox-ose-dkms.template index dff0e1fc764..1220a779d12 100644 --- a/srcpkgs/virtualbox-ose/virtualbox-ose-dkms.template +++ b/srcpkgs/virtualbox-ose/virtualbox-ose-dkms.template @@ -8,7 +8,9 @@ long_desc="${long_desc} use of these modules. Kernel sources or headers are required to compile this module." -dkms_modules="virtualbox-ose ${version}" +revision=1 + +dkms_modules="virtualbox-ose 4.0.0" noarch=yes do_install() diff --git a/srcpkgs/virtualbox-ose/virtualbox-ose-guest-dkms.template b/srcpkgs/virtualbox-ose/virtualbox-ose-guest-dkms.template index 4930e1021fb..08355e55c88 100644 --- a/srcpkgs/virtualbox-ose/virtualbox-ose-guest-dkms.template +++ b/srcpkgs/virtualbox-ose/virtualbox-ose-guest-dkms.template @@ -8,7 +8,9 @@ long_desc="${long_desc} order to make use of these modules. Kernel sources or headers are required to compile these modules." -dkms_modules="virtualbox-ose-guest ${version}" +revision=1 + +dkms_modules="virtualbox-ose-guest 4.0.0" noarch=yes do_install()