summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenjiTakahashi2016-10-16 00:38:22 +0200
committerKenjiTakahashi2016-10-16 00:38:54 +0200
commit2cdf8ca000f37ff9fbf082548f4bf77eb1586cb5 (patch)
treeba4d2fb75516293bcf8333a296b612e690c9b034
downloadaur-2cdf8ca000f37ff9fbf082548f4bf77eb1586cb5.tar.gz
Init, hopefully it works
-rw-r--r--.SRCINFO68
-rw-r--r--.gitignore3
-rw-r--r--002-dri-driver-path.patch28
-rw-r--r--003-ogl-include-path.patch43
-rw-r--r--005-gsoap-build.patch11
-rw-r--r--006-rdesktop-vrdp-keymap-path.patch12
-rw-r--r--007-python2-path.patch9
-rw-r--r--60-vboxdrv.rules8
-rw-r--r--60-vboxguest.rules2
-rw-r--r--LocalConfig.kmk31
-rw-r--r--PKGBUILD178
-rwxr-xr-xbuild.sh3
-rwxr-xr-xvboxreload37
-rw-r--r--vboxservice-nox.service11
-rw-r--r--vboxservice.service12
-rw-r--r--vboxweb.service11
-rw-r--r--virtualbox.install15
-rw-r--r--virtualbox.sysusers1
18 files changed, 483 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..49f3f2b1a355
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,68 @@
+# Generated by mksrcinfo v8
+# Sat Oct 15 22:38:06 UTC 2016
+pkgbase = virtualbox-headless
+ pkgdesc = Powerful x86 virtualization for enterprise as well as home use
+ pkgver = 5.1.6
+ pkgrel = 1
+ url = http://virtualbox.org
+ install = virtualbox.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = custom
+ makedepends = iasl
+ makedepends = libxslt
+ makedepends = cdrkit
+ makedepends = libidl2
+ makedepends = libvpx
+ makedepends = libpulse
+ makedepends = device-mapper
+ makedepends = libvncserver
+ makedepends = gsoap
+ depends = libxml2
+ depends = libxpv
+ depends = libpng
+ depends = python2
+ optdepends = vde2: Virtual Distributed Ethernet support
+ optdepends = net-tools: Host-only or bridged networking support
+ optdepends = virtualbox-guest-iso: Guest Additions CD image
+ optdepends = virtualbox-ext-vnc: VNC server support
+ optdepends = virtualbox-sdk: Developer kit
+ conflicts = virtualbox-ose
+ conflicts = virtualbox
+ replaces = virtualbox-ose
+ replaces = virtualbox
+ backup = etc/vbox/vbox.cfg
+ source = http://download.virtualbox.org/virtualbox/5.1.6/VirtualBox-5.1.6.tar.bz2
+ source = virtualbox.sysusers
+ source = 60-vboxdrv.rules
+ source = 60-vboxguest.rules
+ source = LocalConfig.kmk
+ source = vboxservice.service
+ source = vboxservice-nox.service
+ source = vboxweb.service
+ source = vboxreload
+ source = 002-dri-driver-path.patch
+ source = 003-ogl-include-path.patch
+ source = 005-gsoap-build.patch
+ source = 006-rdesktop-vrdp-keymap-path.patch
+ source = 007-python2-path.patch
+ md5sums = 8c2331a718cfc038963c1214c2ba9811
+ md5sums = 984412a63aa9c07ddc3cfd970381d5df
+ md5sums = 6e2722bfd7013c1b0174382626ac1b8d
+ md5sums = ed1341881437455d9735875ddf455fbe
+ md5sums = 7ef5b89e9b00ac5632521c4950b74a53
+ md5sums = 8ba9179c4a3516904417d773816dd992
+ md5sums = fcf6bcef98b16849d5c9f048592739c0
+ md5sums = bc9efed88e0469cd7fc460d5a5cd7b4b
+ md5sums = 0bab94ff2f4835fd907f89eb23ebbe21
+ md5sums = 9be7e2703afeee1fca9368bd8750e710
+ md5sums = 9e49bbaa2192b141c27ee43cef8cbab7
+ md5sums = e8a0b47e61ddcffdeed71086585a1ef3
+ md5sums = d82a6f19be739341ed7f1cf4ee8070ca
+ md5sums = 188ea65918309f737ce28216c2b07c3b
+ makedepends_x86_64 = gcc-multilib
+ makedepends_x86_64 = lib32-glibc
+
+pkgname = virtualbox-headless
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..d725ba4cf0d2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.tar.*
+pkg/
+src/
diff --git a/002-dri-driver-path.patch b/002-dri-driver-path.patch
new file mode 100644
index 000000000000..777e8e73b8b2
--- /dev/null
+++ b/002-dri-driver-path.patch
@@ -0,0 +1,28 @@
+# 2013 © Sébastien Luttringer
+--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2013-09-04 21:03:47.040743507 +0200
++++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2013-10-20 23:23:49.705371815 +0200
+@@ -58,23 +58,8 @@
+ //#define DEBUG_DRI_CALLS
+
+ //@todo this could be different...
+-#ifdef RT_ARCH_AMD64
+-# ifdef RT_OS_FREEBSD
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
+-# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
+-# else
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/xorg/modules/dri"
++# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri"
+ # define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
+-# endif
+-#else
+-# ifdef RT_OS_FREEBSD
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
+-# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
+-# else
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri:/usr/lib/xorg/modules/dri"
+-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
+-# endif
+-#endif
+
+ #ifdef DEBUG_DRI_CALLS
+ #define SWDRI_SHOWNAME(pext, func) \
diff --git a/003-ogl-include-path.patch b/003-ogl-include-path.patch
new file mode 100644
index 000000000000..0d5cb6d2d9df
--- /dev/null
+++ b/003-ogl-include-path.patch
@@ -0,0 +1,43 @@
+Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+===================================================================
+--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
++++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
+@@ -67,18 +67,12 @@
+ VBoxOGL_INCS = .
+ if1of ($(KBUILD_TARGET), linux solaris freebsd)
+ VBoxOGL_INCS += \
+- $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
+- $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
+- $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
+- $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
+- $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
+- $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
+- $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
+- $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
+- $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
+- $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
++ /usr/include/x11 \
++ /usr/include/xorg \
++ /usr/include/pixman-1 \
+ $(VBOX_MESA_INCS) \
+- $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
++ /usr/include/drm \
++ /usr/include/libdrm
+ VBoxOGL_DEFS += VBOX_NO_NATIVEGL
+ endif
+
+@@ -213,10 +207,10 @@
+
+ if1of ($(KBUILD_TARGET), linux solaris freebsd)
+ VBoxOGL_LIBS += \
+- $(PATH_STAGE_LIB)/libXcomposite.so \
+- $(PATH_STAGE_LIB)/libXdamage.so \
+- $(PATH_STAGE_LIB)/libXfixes.so \
+- $(PATH_STAGE_LIB)/libXext.so
++ Xcomposite \
++ Xdamage \
++ Xfixes \
++ Xext
+ ifdef VBoxOGL_FAKEDRI
+ ifeq ($(KBUILD_TARGET), freebsd)
+ VBoxOGL_LIBS += \
diff --git a/005-gsoap-build.patch b/005-gsoap-build.patch
new file mode 100644
index 000000000000..bba4f0ec7557
--- /dev/null
+++ b/005-gsoap-build.patch
@@ -0,0 +1,11 @@
+--- a/src/VBox/Main/webservice/Makefile.kmk 2013-11-21 19:00:46.812761628 +0100
++++ b/src/VBox/Main/webservice/Makefile.kmk 2016-08-18 15:16:05.803599026 +0100
+@@ -724,7 +724,7 @@ $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \
+ $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
+ $(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
+ $(RM) -f $@
+- $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
++ $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -z1 -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
+ ifeq ($(KBUILD_TARGET),win) # MSC -Wall workaround.
+ $(CP) -f "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp"
+ $(SED) -f $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed --output "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp"
diff --git a/006-rdesktop-vrdp-keymap-path.patch b/006-rdesktop-vrdp-keymap-path.patch
new file mode 100644
index 000000000000..46c72c1ccf87
--- /dev/null
+++ b/006-rdesktop-vrdp-keymap-path.patch
@@ -0,0 +1,12 @@
+# 2015 © Sébastien Luttringer
+--- a/src/VBox/RDP/client-1.8.3/Makefile.kmk 2013-02-19 23:12:20.207464901 +0100
++++ b/src/VBox/RDP/client-1.8.3/Makefile.kmk 2014-01-04 04:17:26.700618600 +0100
+@@ -41,7 +41,7 @@
+ EGD_SOCKET=\"/var/run/egd-pool\" WITH_RDPSND=1 HAVE_DIRENT_H=1 \
+ HAVE_ICONV=1 HAVE_SYS_STATVFS_H=1 \
+ HAVE_SYS_PARAM_H=1 HAVE_SYS_MOUNT_H=1 HAVE_STRUCT_STATVFS_F_NAMEMAX=1 \
+- KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/opt/VirtualBox\")\"/rdesktop-vrdp-keymaps\" \
++ KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/usr/share/virtualbox\")\"/rdesktop-vrdp-keymaps\" \
+ RDESKTOP=1
+ ifdef WITH_BIRD_VD_HACKS
+ rdesktop-vrdp_DEFS += WITH_BIRD_VD_HACKS
diff --git a/007-python2-path.patch b/007-python2-path.patch
new file mode 100644
index 000000000000..d11e75dd9f40
--- /dev/null
+++ b/007-python2-path.patch
@@ -0,0 +1,9 @@
+# 2013 © Sébastien Luttringer
+--- a/src/VBox/Frontends/VBoxShell/vboxshell.py 2014-01-03 01:38:41.831615590 +0100
++++ b/src/VBox/Frontends/VBoxShell/vboxshell.py 2014-01-04 04:23:33.884544420 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python2
+ # -*- coding: utf-8 -*-
+ # $Id: vboxshell.py 49841 2013-12-09 13:32:33Z vboxsync $
+ """
diff --git a/60-vboxdrv.rules b/60-vboxdrv.rules
new file mode 100644
index 000000000000..95d515b06bc5
--- /dev/null
+++ b/60-vboxdrv.rules
@@ -0,0 +1,8 @@
+KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
+KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666"
+KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600"
+
+SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
+SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
+SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
diff --git a/60-vboxguest.rules b/60-vboxguest.rules
new file mode 100644
index 000000000000..6285f724994b
--- /dev/null
+++ b/60-vboxguest.rules
@@ -0,0 +1,2 @@
+ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600"
+ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"
diff --git a/LocalConfig.kmk b/LocalConfig.kmk
new file mode 100644
index 000000000000..00ec64bdaa64
--- /dev/null
+++ b/LocalConfig.kmk
@@ -0,0 +1,31 @@
+# do not build test cases
+VBOX_WITH_TESTCASES :=
+VBOX_WITH_TESTSUITE :=
+VBOX_WITH_VALIDATIONKIT :=
+
+# archlinux path
+VBOX_WITH_ORIGIN :=
+VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
+VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
+VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
+VBOX_PATH_APP_DOCS := /usr/share/doc/virtualbox
+VBOX_PATH_PACKAGE_DOCS := $(VBOX_PATH_APP_DOCS)
+VBOX_BLD_PYTHON = python2
+VBOX_JAVA_HOME = /usr/lib/jvm/java-7-openjdk
+
+# do not fail on warning
+VBOX_GCC_WERR =
+VBOX_GCC_WARN =
+
+# fix gsoap missing zlib include and produce errors with --as-needed
+VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
+
+# use system xorg
+VBOX_USE_SYSTEM_XORG_HEADERS = 1
+
+# no update request. update are handled via pacman
+VBOX_WITH_UPDATE_REQUEST := 0
+
+# do not build additions
+VBOX_WITH_ADDITIONS :=
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d3f4dbe371cf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,178 @@
+# $Id: PKGBUILD 189868 2016-09-17 14:37:19Z seblu $
+# Maintainer: Sébastien "Seblu" Luttringer
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+
+pkgname=virtualbox-headless
+pkgver=5.1.6
+pkgrel=1
+pkgdesc='Powerful x86 virtualization for enterprise as well as home use. Headless build (no GUI, no Java).'
+arch=('i686' 'x86_64')
+url='http://virtualbox.org'
+license=('GPL' 'custom')
+depends=('libxml2' 'libxpv' 'libpng' 'python2')
+makedepends=('iasl' 'libxslt' 'cdrkit' 'libidl2' 'libvpx' 'libpulse' 'device-mapper' 'libvncserver' 'gsoap')
+makedepends_x86_64=('gcc-multilib' 'lib32-glibc')
+optdepends=('vde2: Virtual Distributed Ethernet support'
+ 'net-tools: Host-only or bridged networking support'
+ 'virtualbox-guest-iso: Guest Additions CD image'
+ 'virtualbox-ext-vnc: VNC server support'
+ 'virtualbox-sdk: Developer kit')
+backup=('etc/vbox/vbox.cfg')
+replaces=('virtualbox-ose' 'virtualbox')
+conflicts=('virtualbox-ose' 'virtualbox')
+install=virtualbox.install
+source=("http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.tar.bz2"
+ 'virtualbox.sysusers'
+ '60-vboxdrv.rules'
+ '60-vboxguest.rules'
+ 'LocalConfig.kmk'
+ 'vboxservice.service'
+ 'vboxservice-nox.service'
+ 'vboxweb.service'
+ 'vboxreload'
+ '002-dri-driver-path.patch'
+ '003-ogl-include-path.patch'
+ '005-gsoap-build.patch'
+ '006-rdesktop-vrdp-keymap-path.patch'
+ '007-python2-path.patch'
+ )
+md5sums=('8c2331a718cfc038963c1214c2ba9811'
+ '984412a63aa9c07ddc3cfd970381d5df'
+ '6e2722bfd7013c1b0174382626ac1b8d'
+ 'ed1341881437455d9735875ddf455fbe'
+ '7ef5b89e9b00ac5632521c4950b74a53'
+ '8ba9179c4a3516904417d773816dd992'
+ 'fcf6bcef98b16849d5c9f048592739c0'
+ 'bc9efed88e0469cd7fc460d5a5cd7b4b'
+ '0bab94ff2f4835fd907f89eb23ebbe21'
+ '9be7e2703afeee1fca9368bd8750e710'
+ '9e49bbaa2192b141c27ee43cef8cbab7'
+ 'e8a0b47e61ddcffdeed71086585a1ef3'
+ 'd82a6f19be739341ed7f1cf4ee8070ca'
+ '188ea65918309f737ce28216c2b07c3b')
+
+prepare() {
+ cd "VirtualBox-$pkgver"
+
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch $filename"
+ patch -p1 -N -i "$srcdir/$filename"
+ fi
+ done
+
+ msg2 'Applying local config'
+ cp "$srcdir/LocalConfig.kmk" .
+
+ msg2 'Use our CFLAGS'
+ echo "VBOX_GCC_OPT=$CXXFLAGS" >> LocalConfig.kmk
+
+ msg2 'Remove gcc version censorship'
+ sed -i 's/^check_gcc$/#check_gcc/' configure
+}
+
+build() {
+ cd "VirtualBox-$pkgver"
+
+ msg2 'Build virtualbox'
+ ./configure \
+ --build-headless \
+ --disable-docs \
+ --enable-webservice \
+ --enable-vde \
+ --enable-vnc \
+ --disable-java \
+ --disable-kmods \
+ --with-makeself=/usr/bin/echo
+ # fake makeself binary to compile without nofatal
+ # makeself is used by linux installer. we don't need it.
+ source ./env.sh
+ kmk
+
+ msg2 'Build rdesktop-vrdp'
+ kmk -C src/VBox/RDP/client-1.8.3
+
+ msg2 'Build VNC extension pack'
+ kmk -C src/VBox/ExtPacks/VNC packing
+}
+
+package() {
+
+ source "VirtualBox-$pkgver/env.sh"
+ cd "VirtualBox-$pkgver/out/linux.$BUILD_PLATFORM_ARCH/release/bin"
+
+ # binaries
+ install -dm755 "$pkgdir/usr/bin"
+ install -m755 VBox.sh "$pkgdir/usr/bin/VBox"
+ for i in VBoxHeadless VBoxManage vboxwebsrv VBoxBalloonCtrl; do
+ ln -sf VBox "$pkgdir/usr/bin/$i"
+ ln -sf VBox "$pkgdir/usr/bin/${i,,}"
+ done
+ install -m755 VBoxTunctl "$pkgdir/usr/bin"
+ install -m755 rdesktop-vrdp "$pkgdir/usr/bin"
+
+ # libraries
+ install -dm755 "$pkgdir/usr/lib/virtualbox"
+ install -m755 *.so "$pkgdir/usr/lib/virtualbox"
+ install -m644 *.rc *.r0 VBoxEFI*.fd "$pkgdir/usr/lib/virtualbox"
+ ## setuid root binaries
+ install -m4755 VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl VBoxNetNAT -t "$pkgdir/usr/lib/virtualbox"
+ ## other binaries
+ install -m755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxBalloonCtrl vboxwebsrv webtest -t "$pkgdir/usr/lib/virtualbox"
+
+ # components
+ install -dm755 "$pkgdir/usr/lib/virtualbox/components"
+ install -m755 components/* -t "$pkgdir/usr/lib/virtualbox/components"
+
+ # extensions packs
+ ## as virtualbox install itself stuff in this directory, move it to /var and
+ ## trick it with a symlink
+ ## FIXME: trick is disabled for now
+ #install -dm755 "$pkgdir/var/lib/virtualbox/extensions"
+ #install -dm755 "$pkgdir/usr/share/virtualbox/extensions"
+ #ln -s ../../../var/lib/virtualbox/extensions "$pkgdir/usr/lib/virtualbox/ExtensionPacks"
+ install -dm755 "$pkgdir/usr/lib/virtualbox/ExtensionPacks"
+
+ # rdesktop keymaps
+ install -dm755 "$pkgdir/usr/share/virtualbox/rdesktop-vrdp-keymaps"
+ install -m644 rdesktop-vrdp-keymaps/* "$pkgdir/usr/share/virtualbox/rdesktop-vrdp-keymaps"
+
+ # useless scripts
+ install -m755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t "$pkgdir/usr/share/virtualbox"
+
+ # icons
+ install -Dm644 VBox.png "$pkgdir/usr/share/pixmaps/VBox.png"
+
+ pushd icons >/dev/null
+ for i in *; do
+ install -d "$pkgdir/usr/share/icons/hicolor/$i/mimetypes"
+ cp $i/* "$pkgdir/usr/share/icons/hicolor/$i/mimetypes"
+ done
+ popd >/dev/null
+
+ #desktop
+ install -Dm644 virtualbox.xml "$pkgdir/usr/share/mime/packages/virtualbox.xml"
+
+ #install configuration
+ install -dm755 "$pkgdir/etc/vbox"
+ echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg"
+
+ # back to srcdir
+ cd "$srcdir"
+
+ #licence
+ install -Dm644 VirtualBox-$pkgver/COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # install systemd stuff
+ install -Dm644 60-vboxdrv.rules "$pkgdir/usr/lib/udev/rules.d/60-vboxdrv.rules"
+ install -Dm644 vboxweb.service "$pkgdir/usr/lib/systemd/system/vboxweb.service"
+ install -Dm644 virtualbox.sysusers "$pkgdir/usr/lib/sysusers.d/virtualbox.conf"
+
+ # install module reloading shortcut (with a symlink with default helper)
+ install -Dm755 vboxreload "$pkgdir/usr/bin"
+ ln -s vboxreload "$pkgdir/usr/bin/rcvboxdrv"
+}
+
+# vim:set ts=4 sw=4 et:
diff --git a/build.sh b/build.sh
new file mode 100755
index 000000000000..11c0aac7e228
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+multilib-build "$@" && extra-i686-build "$@"
diff --git a/vboxreload b/vboxreload
new file mode 100755
index 000000000000..04b6e7b9e381
--- /dev/null
+++ b/vboxreload
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# vboxreload: shortcut to reload virtualbox host modules
+#
+# Copyright © 2016 Sébastien Luttringer
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+(( UID > 0 )) && { echo 'You must be root' >&2; exit 1; }
+
+modules=(vboxnetadp vboxnetflt vboxpci vboxdrv)
+
+echo -n 'Unloading modules: '
+for _m in "${modules[@]}"; do
+ lsmod|grep -q "$_m" && rmmod "$_m" && echo -n "$_m "
+done
+echo
+
+echo -n 'Loading modules: '
+for _m in "${modules[@]}"; do
+ modprobe "$_m" && echo -n "$_m "
+done
+echo
+
+# vim:set ts=2 sw=2 ai et:
diff --git a/vboxservice-nox.service b/vboxservice-nox.service
new file mode 100644
index 000000000000..7204fda119b7
--- /dev/null
+++ b/vboxservice-nox.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=VirtualBox Guest Service
+ConditionVirtualization=oracle
+
+[Service]
+ExecStartPre=-/usr/bin/modprobe vboxguest
+ExecStartPre=-/usr/bin/modprobe vboxsf
+ExecStart=/usr/bin/VBoxService -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vboxservice.service b/vboxservice.service
new file mode 100644
index 000000000000..7e0c87f0b5fa
--- /dev/null
+++ b/vboxservice.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=VirtualBox Guest Service
+ConditionVirtualization=oracle
+
+[Service]
+ExecStartPre=-/usr/bin/modprobe vboxguest
+ExecStartPre=-/usr/bin/modprobe vboxvideo
+ExecStartPre=-/usr/bin/modprobe vboxsf
+ExecStart=/usr/bin/VBoxService -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vboxweb.service b/vboxweb.service
new file mode 100644
index 000000000000..303381597a40
--- /dev/null
+++ b/vboxweb.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=VirtualBox Web Service
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/vboxweb.pid
+ExecStart=/usr/bin/vboxwebsrv --pidfile /run/vboxweb.pid --background
+
+[Install]
+WantedBy=multi-user.target
diff --git a/virtualbox.install b/virtualbox.install
new file mode 100644
index 000000000000..158e236c91ba
--- /dev/null
+++ b/virtualbox.install
@@ -0,0 +1,15 @@
+# vim:set ts=2 sw=2 ft=sh et:
+
+# arg 1: the new package version
+post_install() {
+ systemd-sysusers virtualbox.conf
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if (( $(vercmp $2 5.0.16-1) < 0 )); then
+ echo '==> Since version 5.0.14-2 kernel modules are provided via dkms'
+ echo '==> Check you have the headers matching your kernel installed'
+ fi
+}
diff --git a/virtualbox.sysusers b/virtualbox.sysusers
new file mode 100644
index 000000000000..4d4caeb27936
--- /dev/null
+++ b/virtualbox.sysusers
@@ -0,0 +1 @@
+g vboxusers 108 -