2010-12-23 14:41:13 +01:00
|
|
|
# Template file for 'virtualbox-ose'
|
|
|
|
pkgname=virtualbox-ose
|
2012-05-23 12:55:40 +02:00
|
|
|
_vbox_distver=4.1.16
|
2011-01-19 20:51:38 +01:00
|
|
|
version=${_vbox_distver}
|
2012-03-14 16:49:06 +01:00
|
|
|
wrksrc="VirtualBox-${version}"
|
2011-07-10 21:29:11 +02:00
|
|
|
patch_args="-Np1"
|
2010-12-23 14:41:13 +01:00
|
|
|
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
|
2012-05-23 18:26:56 +02:00
|
|
|
depends="virtualbox-ose-dkms>=4.1.16 hicolor-icon-theme desktop-file-utils"
|
|
|
|
makedepends="which openssl-devel libcurl-devel libpng-devel SDL-devel qt-devel libXext-devel libXcursor-devel libXinerama-devel libXrandr-devel libXcomposite-devel MesaLib-devel libIDL-devel glib-devel pam-devel pulseaudio-devel libxslt-devel libcap-devel xorg-server-devel docbook-xsl acpica-utils kernel-headers dev86 yasm"
|
2012-05-23 20:58:45 +02:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
|
|
makedepends="${makedepends} gcc-c++-multilib"
|
|
|
|
fi
|
|
|
|
system_groups="vboxusers"
|
|
|
|
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
|
|
|
subpackages="${pkgname}-dkms ${pkgname}-guest ${pkgname}-guest-dkms"
|
|
|
|
systemd_services="virtualbox.service on"
|
2010-12-23 14:41:13 +01:00
|
|
|
short_desc="General-purpose full virtualizer for x86 hardware"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-07-10 21:29:11 +02:00
|
|
|
homepage="http://virtualbox.org"
|
|
|
|
license="GPL-2, MPL-1.1, CDDL"
|
2012-05-23 12:55:40 +02:00
|
|
|
checksum=b670499804c718a8ebbc7c2ddee37f70e98771a151391a597b5808f4310f824e
|
2010-12-23 14:41:13 +01:00
|
|
|
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."
|
|
|
|
|
2012-03-14 16:49:06 +01:00
|
|
|
do_build() {
|
|
|
|
local _khdrver=$($XBPS_PKGDB_CMD version kernel-headers)
|
2010-12-23 14:41:13 +01:00
|
|
|
|
2012-03-14 16:49:06 +01:00
|
|
|
cp ${FILESDIR}/LocalConfig.kmk .
|
|
|
|
./configure --disable-docs --disable-java --enable-vde \
|
|
|
|
--disable-python --disable-kmods \
|
|
|
|
--nofatal --with-linux=/usr/src/kernel-headers-${_khdrver}
|
|
|
|
sed -i "s|/bin/pwd|/usr/bin/pwd|g" kBuild/env.sh
|
2010-12-23 14:41:13 +01:00
|
|
|
source ./env.sh
|
2011-01-19 20:51:38 +01:00
|
|
|
kmk ${makejobs} all
|
2010-12-23 14:41:13 +01:00
|
|
|
}
|
|
|
|
|
2012-03-14 16:49:06 +01:00
|
|
|
do_install() {
|
2010-12-23 14:41:13 +01:00
|
|
|
local f _osedir _guestdir
|
|
|
|
|
|
|
|
source ./env.sh
|
|
|
|
#
|
|
|
|
# virtualbox-ose.
|
|
|
|
#
|
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin
|
|
|
|
mkdir -p ${DESTDIR}/usr/{bin,lib/virtualbox/components,share/virtualbox/nls}
|
|
|
|
|
|
|
|
install -m0755 VBox.sh ${DESTDIR}/usr/bin/VBox
|
2011-07-10 21:29:11 +02:00
|
|
|
for f in VirtualBox VBoxManage VBoxSDL VBoxHeadless \
|
|
|
|
VBoxBalloonCtrl; do
|
2010-12-23 14:41:13 +01:00
|
|
|
ln -sf VBox ${DESTDIR}/usr/bin/${f}
|
|
|
|
done
|
2011-07-10 21:29:11 +02:00
|
|
|
# comoonents
|
2010-12-23 14:41:13 +01:00
|
|
|
install -m0755 components/* -t ${DESTDIR}/usr/lib/virtualbox/components
|
2011-07-10 21:29:11 +02:00
|
|
|
|
|
|
|
# libs
|
2010-12-23 14:41:13 +01:00
|
|
|
install -m0755 *.so ${DESTDIR}/usr/lib/virtualbox
|
2011-07-20 09:11:04 +02:00
|
|
|
install -m0644 *.gc *.r0 *.fd ${DESTDIR}/usr/lib/virtualbox
|
2011-07-10 21:29:11 +02:00
|
|
|
|
|
|
|
# setuid
|
2010-12-23 14:41:13 +01:00
|
|
|
install -m4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl \
|
|
|
|
VirtualBox VBoxBFE -t ${DESTDIR}/usr/lib/virtualbox
|
2011-07-10 21:29:11 +02:00
|
|
|
|
|
|
|
install -m0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD \
|
|
|
|
VBoxTestOGL VBoxBalloonCtrl \
|
|
|
|
-t ${DESTDIR}/usr/lib/virtualbox
|
|
|
|
|
|
|
|
# locales
|
2010-12-23 14:41:13 +01:00
|
|
|
install -m0755 nls/*.qm -t ${DESTDIR}/usr/share/virtualbox/nls
|
|
|
|
|
2011-07-11 09:14:49 +02:00
|
|
|
# scripts
|
|
|
|
install -m0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh \
|
|
|
|
-t ${DESTDIR}/usr/share/virtualbox
|
|
|
|
|
2011-07-10 21:29:11 +02:00
|
|
|
# icons and desktop
|
2010-12-23 14:41:13 +01:00
|
|
|
install -D -m0644 VBox.png ${DESTDIR}/usr/share/pixmaps/VBox.png
|
|
|
|
install -D -m0644 virtualbox.desktop \
|
|
|
|
${DESTDIR}/usr/share/applications/virtualbox.desktop
|
|
|
|
sed -i -e "s|Icon=VBox|Icon=VBox.png|" \
|
|
|
|
${DESTDIR}/usr/share/applications/virtualbox.desktop
|
2011-07-20 09:11:04 +02:00
|
|
|
install -Dm644 virtualbox.xml \
|
|
|
|
${DESTDIR}/usr/share/mime/packages/virtualbox.xml
|
2010-12-23 14:41:13 +01:00
|
|
|
install -d ${DESTDIR}/usr/share/icons/hicolor
|
2011-10-03 14:48:55 +02:00
|
|
|
for i in icons/*; do
|
|
|
|
ldir=$(basename ${i})
|
|
|
|
install -d ${DESTDIR}/usr/share/icons/hicolor/${ldir}/mimetypes
|
|
|
|
cp -a ${i}/* ${DESTDIR}/usr/share/icons/hicolor/${ldir}/mimetypes
|
|
|
|
done
|
2010-12-23 14:41:13 +01:00
|
|
|
|
2011-07-10 21:29:11 +02:00
|
|
|
# configuration file
|
2010-12-23 14:41:13 +01:00
|
|
|
mkdir -p ${DESTDIR}/etc/vbox
|
|
|
|
echo 'INSTALL_DIR=/usr/lib/virtualbox' > ${DESTDIR}/etc/vbox/vbox.cfg
|
|
|
|
|
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin
|
|
|
|
install -d ${DESTDIR}/usr/share/licenses/${pkgname}
|
|
|
|
install -m0644 ${wrksrc}/COPYING* \
|
|
|
|
${DESTDIR}/usr/share/licenses/${pkgname}
|
2011-07-10 21:29:11 +02:00
|
|
|
|
2011-10-10 16:35:52 +02:00
|
|
|
# Install systemd unit.
|
|
|
|
vinstall ${FILESDIR}/virtualbox.service 644 lib/systemd/system
|
2010-12-23 14:41:13 +01:00
|
|
|
}
|