2007-05-15 21:56:52 +02:00
|
|
|
# Description: VirtualBox is a general-purpose full virtualizer for x86 hardware.
|
|
|
|
# URL: http://www.virtualbox.org/
|
2009-10-31 11:57:36 +01:00
|
|
|
# Maintainer: Jose V Beneyto, sepen at crux dot nu
|
|
|
|
# Packager: Jose V Beneyto, sepen at crux dot nu
|
2012-05-02 17:16:26 +02:00
|
|
|
# Depends on: bin86 dev86 libsdl libidl qt4 xerces-c iasl xorg-libxmu libcap makeself
|
2007-05-15 21:56:52 +02:00
|
|
|
|
|
|
|
name=virtualbox
|
2013-03-15 18:43:47 +01:00
|
|
|
version=4.2.10
|
2010-11-11 15:12:32 +01:00
|
|
|
release=1
|
2011-01-27 15:01:52 +01:00
|
|
|
source=(http://download.virtualbox.org/$name/${version%-*}/VirtualBox-${version}.tar.bz2 \
|
2010-11-11 15:12:32 +01:00
|
|
|
$name 60-vboxdrv.rules $name.desktop)
|
2007-05-15 21:56:52 +02:00
|
|
|
|
|
|
|
build() {
|
2009-04-14 13:50:01 +00:00
|
|
|
# environment value
|
|
|
|
[ ! -z $KERN_DIR ] && KARG="KERN_DIR=$KERN_DIR"
|
2008-10-08 00:56:30 +02:00
|
|
|
|
2012-05-02 17:16:26 +02:00
|
|
|
cd VirtualBox-$version
|
2010-11-11 15:12:32 +01:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
sed -i src/VBox/Devices/PC/vbox.dsl \
|
|
|
|
-e 's|Name (_CID, "smc-napa")|Name (_CID, "smcnapa")|'
|
|
|
|
|
2007-05-15 21:56:52 +02:00
|
|
|
# compile
|
2009-04-14 13:50:01 +00:00
|
|
|
./configure --with-qt4-dir=/usr/share/qt4 \
|
2008-10-08 00:56:30 +02:00
|
|
|
--disable-hardening \
|
|
|
|
--ose \
|
2011-01-27 15:01:52 +01:00
|
|
|
--disable-pulse \
|
|
|
|
--disable-python \
|
|
|
|
--disable-java \
|
|
|
|
--disable-docs
|
|
|
|
|
2007-05-15 21:56:52 +02:00
|
|
|
source ./env.sh
|
|
|
|
kmk all
|
2010-11-11 15:12:32 +01:00
|
|
|
|
2008-12-23 11:43:50 +00:00
|
|
|
# compile kernel modules
|
2013-02-22 20:46:51 +01:00
|
|
|
cd out/linux.amd64/release/bin/src
|
|
|
|
|
2008-12-23 20:27:07 +01:00
|
|
|
make $KARG
|
2010-11-11 15:12:32 +01:00
|
|
|
|
2008-12-23 11:43:50 +00:00
|
|
|
# install kernel modules
|
2009-07-01 10:19:54 +00:00
|
|
|
install -d $PKG/lib/modules/$(uname -r)/kernel/drivers/misc
|
|
|
|
install -m 0644 *.ko $PKG/lib/modules/$(uname -r)/kernel/drivers/misc
|
2010-11-11 15:12:32 +01:00
|
|
|
|
2007-07-04 18:35:21 +02:00
|
|
|
# remove superfluous files
|
2013-02-22 20:46:51 +01:00
|
|
|
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 {} \;
|
2010-11-11 15:12:32 +01:00
|
|
|
|
2007-07-04 18:35:21 +02:00
|
|
|
# do the rest
|
2008-05-14 23:43:02 +02:00
|
|
|
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}
|
2008-06-20 15:34:46 +02:00
|
|
|
install -m 0755 $SRC/$name $PKG/usr/bin/$name
|
2013-02-22 20:46:51 +01:00
|
|
|
mv $SRC/VirtualBox-$version/out/linux.amd64/release/{bin,lib} $PKG/usr/share/$name
|
2008-09-05 17:12:09 +02:00
|
|
|
chmod +s $PKG/usr/share/$name/bin/VirtualBox
|
2008-05-14 23:43:02 +02:00
|
|
|
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}
|
2007-05-15 21:56:52 +02:00
|
|
|
}
|