virtualbox-ose: add a rc script to (un)load host modules, disable makeself/mkisofs builddeps.

This commit is contained in:
Juan RP 2011-01-11 16:12:28 +01:00
parent f4365875fb
commit 3b77f3854c
5 changed files with 59 additions and 9 deletions

View file

@ -3,12 +3,6 @@ post)
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.

View file

@ -0,0 +1,33 @@
#!/sbin/runscript
#
# OpenRC service for VirtualBox.
name="VirtualBox module (un)loader"
depend()
{
provide virtualbox
need sysfs
}
start()
{
ebegin "Loading VirtualBox host modules"
for _mod_ in vboxdrv vboxnetadp vboxnetflt; do
if grep -vq '^${_mod_}' /proc/modules; then
modprobe -q ${_mod_}
fi
done
eend $?
}
stop()
{
ebegin "Unloading VirtualBox host modules"
for _mod_ in vboxnetflt vboxnetadp vboxdrv; do
if ! grep -q '^${_mod_}' /proc/modules; then
modprobe -rq ${_mod_}
fi
done
eend $?
}

View file

@ -0,0 +1,10 @@
--- configure.orig
+++ configure
@@ -2527,7 +2527,6 @@
check_compiler_h
[ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
# tools/common/makeself*
- [ $OSE -ge 1 ] && check_makeself
fi
[ -n "$SETUP_WINE" ] && setup_wine

View file

@ -0,0 +1,10 @@
--- configure.orig
+++ configure
@@ -2499,7 +2499,6 @@
# don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
# [ "$OS" != "darwin" ] && check_yasm
[ "$OS" != "darwin" ] && check_xsltproc
-[ "$OS" != "darwin" ] && check_mkisofs
# the libraries
[ "$OS" != "darwin" ] && check_pthread

View file

@ -1,7 +1,7 @@
# Template file for 'virtualbox-ose'
pkgname=virtualbox-ose
version=4.0.0
revision=1
revision=2
wrksrc="VirtualBox-${version}_OSE"
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
build_style=custom-install
@ -15,6 +15,7 @@ long_desc="
system_groups="vboxusers"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
subpackages="${pkgname}-dkms ${pkgname}-guest ${pkgname}-guest-dkms"
openrc_services="virtualbox default true"
Add_dependency run libgcc
Add_dependency run glibc
@ -62,8 +63,6 @@ Add_dependency build docbook-xsl
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
@ -136,6 +135,10 @@ do_install()
install -d ${DESTDIR}/usr/share/licenses/${pkgname}
install -m0644 ${wrksrc}/COPYING* \
${DESTDIR}/usr/share/licenses/${pkgname}
# Install the OpenRC service.
install -D -m755 ${FILESDIR}/virtualbox.rc \
${DESTDIR}/etc/init.d/virtualbox
#
# virtualbox-ose-dkms.
#