63 lines
2.2 KiB
Plaintext
63 lines
2.2 KiB
Plaintext
# Description: VirtualBox is a general-purpose full virtualizer for x86 hardware.
|
|
# URL: http://www.virtualbox.org/
|
|
# Maintainer: Jose V Beneyto, sepen at crux dot nu
|
|
# Depends on: bin86 dev86 libsdl libidl qt5 xerces-c iasl xorg-libxmu libcap makeself cdrkit glu libvpx
|
|
|
|
name=virtualbox
|
|
version=5.1.18
|
|
release=1
|
|
source=(http://download.virtualbox.org/$name/$version/VirtualBox-$version.tar.bz2 \
|
|
$name 60-vboxdrv.rules $name.desktop)
|
|
|
|
build() {
|
|
# customize kernel version
|
|
if [ ! -z $KERN_DIR ]; then
|
|
KVER="$(make -s -C $KERN_DIR kernelversion)"
|
|
KARGS="KERN_DIR=$KERN_DIR"
|
|
else
|
|
KVER="$(uname -r)"
|
|
fi
|
|
KARGS="$KARGS MODULE_DIR=$PKG/lib/modules/$KVER/extra"
|
|
|
|
cd VirtualBox-$version
|
|
|
|
sed -i Config.kmk \
|
|
-e "s|VBOX_WITH_WARNINGS_AS_ERRORS = 1|VBOX_WITH_WARNINGS_AS_ERRORS =|g" \
|
|
-e "s|VBOX_WITH_PAM = 1|VBOX_WITH_PAM =|g" \
|
|
-e "s|VBOX_WITH_AUDIO_PULSE = 1|VBOX_WITH_AUDIO_PULSE =|g" \
|
|
-e "s|VBOX_WITH_QTGUI_V5 = 1|VBOX_WITH_QTGUI_V5 =|g"
|
|
|
|
sed -i src/VBox/Devices/PC/vbox.dsl \
|
|
-e 's|Name (_CID, "smc-napa")|Name (_CID, "smcnapa")|'
|
|
|
|
# compile
|
|
./configure --enable-qt5 \
|
|
--disable-hardening \
|
|
--ose \
|
|
--disable-pulse \
|
|
--disable-python \
|
|
--disable-java \
|
|
--disable-docs
|
|
|
|
source ./env.sh
|
|
kmk all
|
|
|
|
# compile and install kernel modules
|
|
sed '/depmod -a/d' -i out/linux.amd64/release/bin/src/*/Makefile
|
|
make -s -C out/linux.amd64/release/bin/src $KARGS install
|
|
|
|
# remove superfluous files
|
|
rm -rf $SRC/VirtualBox-$version/out/linux.amd64/release/bin/{sdk/samples,testcase,nls*}
|
|
find $SRC/VirtualBox-$version/out/linux.amd64/release/bin -type f -name 'tst*' -exec rm -rf {} \;
|
|
|
|
# do the rest
|
|
install -D -m 0644 $SRC/60-vboxdrv.rules $PKG/etc/udev/rules.d/60-vboxdrv.rules
|
|
install -d $PKG/usr/{bin,share/$name,share/pixmaps}
|
|
install -m 0755 $SRC/$name $PKG/usr/bin/$name
|
|
mv $SRC/VirtualBox-$version/out/linux.amd64/release/{bin,lib} $PKG/usr/share/$name
|
|
chown root:vboxusers $PKG/usr/share/$name/bin/VirtualBox
|
|
install -D -m 0644 $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
|
|
mv $PKG/usr/share/$name/bin/VBox.png $PKG/usr/share/pixmaps/$name.png
|
|
rm $PKG/usr/share/$name/bin/{VBox.sh,SUP*nstall}
|
|
}
|