2010-12-23 13:41:13 +00:00
|
|
|
# Template file for 'virtualbox-ose'
|
|
|
|
pkgname=virtualbox-ose
|
2011-08-16 07:14:51 +00:00
|
|
|
_vbox_distver=4.1.2
|
2011-01-19 19:51:38 +00:00
|
|
|
version=${_vbox_distver}
|
2011-07-10 19:29:11 +00:00
|
|
|
patch_args="-Np1"
|
2010-12-23 13:41:13 +00:00
|
|
|
wrksrc="VirtualBox-${version}_OSE"
|
|
|
|
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
|
|
|
|
build_style=custom-install
|
|
|
|
short_desc="General-purpose full virtualizer for x86 hardware"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-07-10 19:29:11 +00:00
|
|
|
homepage="http://virtualbox.org"
|
|
|
|
license="GPL-2, MPL-1.1, CDDL"
|
2011-08-16 07:14:51 +00:00
|
|
|
checksum=b030faa24d6bad805cc1105876fb04befc0a8acd154c8e7dc1b32f323bc576bc
|
2010-12-23 13:41:13 +00: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."
|
|
|
|
|
2010-12-28 10:24:23 +00:00
|
|
|
system_groups="vboxusers"
|
2011-07-20 07:11:04 +00:00
|
|
|
triggers="mimedb"
|
2010-12-23 13:41:13 +00:00
|
|
|
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
|
|
|
subpackages="${pkgname}-dkms ${pkgname}-guest ${pkgname}-guest-dkms"
|
2011-01-11 15:12:28 +00:00
|
|
|
openrc_services="virtualbox default true"
|
2010-12-23 13:41:13 +00:00
|
|
|
|
|
|
|
Add_dependency run libgcc
|
|
|
|
Add_dependency run glibc
|
|
|
|
Add_dependency run libstdc++
|
|
|
|
Add_dependency run libpng
|
|
|
|
Add_dependency run zlib
|
|
|
|
Add_dependency run libssl
|
|
|
|
Add_dependency run libxml2
|
|
|
|
Add_dependency run libcurl
|
|
|
|
Add_dependency run SDL
|
|
|
|
Add_dependency run qt
|
|
|
|
Add_dependency run libX11
|
|
|
|
Add_dependency run libXmu
|
|
|
|
Add_dependency run libXext
|
|
|
|
Add_dependency run python
|
|
|
|
Add_dependency run libXcursor
|
|
|
|
Add_dependency run libXt
|
|
|
|
Add_dependency run libXinerama
|
2011-07-10 19:29:11 +00:00
|
|
|
Add_dependency run libXrandr
|
2010-12-23 13:41:13 +00:00
|
|
|
Add_dependency run MesaLib
|
|
|
|
Add_dependency run libIDL
|
|
|
|
Add_dependency run glib
|
2011-07-10 19:29:11 +00:00
|
|
|
Add_dependency run libpulseaudio
|
2010-12-23 13:41:13 +00:00
|
|
|
Add_dependency run ${pkgname}-dkms ">=${version}"
|
2011-07-10 19:29:11 +00:00
|
|
|
Add_dependency run hicolor-icon-theme
|
|
|
|
Add_dependency run desktop-file-utils
|
2010-12-23 13:41:13 +00:00
|
|
|
|
|
|
|
Add_dependency build openssl-devel
|
|
|
|
Add_dependency build libcurl-devel
|
|
|
|
Add_dependency build SDL-devel
|
|
|
|
Add_dependency build qt-devel
|
|
|
|
Add_dependency build libXext-devel
|
|
|
|
Add_dependency build libXcursor-devel
|
|
|
|
Add_dependency build libXinerama-devel
|
2011-07-10 19:29:11 +00:00
|
|
|
Add_dependency build libXrandr-devel
|
2010-12-23 13:41:13 +00:00
|
|
|
Add_dependency build MesaLib-devel
|
|
|
|
Add_dependency build libIDL-devel
|
|
|
|
Add_dependency build glib-devel
|
|
|
|
Add_dependency build pam-devel
|
2011-07-10 19:29:11 +00:00
|
|
|
Add_dependency build pulseaudio-devel
|
|
|
|
Add_dependency build libxslt-devel
|
|
|
|
Add_dependency build xorg-server-devel
|
2010-12-23 13:41:13 +00:00
|
|
|
Add_dependency build docbook-xsl
|
|
|
|
Add_dependency build acpica-utils
|
|
|
|
Add_dependency build kernel-headers
|
|
|
|
Add_dependency build dev86
|
2011-01-11 15:19:50 +00:00
|
|
|
Add_dependency build yasm
|
2010-12-23 13:41:13 +00:00
|
|
|
if [ "${xbps_machine}" = "x86_64" ]; then
|
|
|
|
Add_dependency build gcc-c++-multilib
|
|
|
|
fi
|
|
|
|
|
|
|
|
do_build()
|
|
|
|
{
|
|
|
|
_khdrver=$($XBPS_PKGDB_CMD version kernel-headers)
|
|
|
|
|
|
|
|
# Fix path for kernel-headers location.
|
|
|
|
sed -i -e "s|@@XBPS_KERNHDRVER@@|${_khdrver}|g" configure
|
|
|
|
|
|
|
|
# Build.
|
|
|
|
cp -f ${FILESDIR}/LocalConfig.kmk .
|
2011-07-20 07:11:04 +00:00
|
|
|
./configure --enable-vde --disable-java --disable-docs
|
2010-12-23 13:41:13 +00:00
|
|
|
source ./env.sh
|
2011-01-19 19:51:38 +00:00
|
|
|
kmk ${makejobs} all
|
2010-12-23 13:41:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install()
|
|
|
|
{
|
|
|
|
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 19:29:11 +00:00
|
|
|
for f in VirtualBox VBoxManage VBoxSDL VBoxHeadless \
|
|
|
|
VBoxBalloonCtrl; do
|
2010-12-23 13:41:13 +00:00
|
|
|
ln -sf VBox ${DESTDIR}/usr/bin/${f}
|
|
|
|
done
|
2011-07-10 19:29:11 +00:00
|
|
|
# comoonents
|
2010-12-23 13:41:13 +00:00
|
|
|
install -m0755 components/* -t ${DESTDIR}/usr/lib/virtualbox/components
|
2011-07-10 19:29:11 +00:00
|
|
|
|
|
|
|
# libs
|
2010-12-23 13:41:13 +00:00
|
|
|
install -m0755 *.so ${DESTDIR}/usr/lib/virtualbox
|
2011-07-20 07:11:04 +00:00
|
|
|
install -m0644 *.gc *.r0 *.fd ${DESTDIR}/usr/lib/virtualbox
|
2011-07-10 19:29:11 +00:00
|
|
|
|
|
|
|
# setuid
|
2010-12-23 13:41:13 +00:00
|
|
|
install -m4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl \
|
|
|
|
VirtualBox VBoxBFE -t ${DESTDIR}/usr/lib/virtualbox
|
2011-07-10 19:29:11 +00:00
|
|
|
|
|
|
|
install -m0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD \
|
|
|
|
VBoxTestOGL VBoxBalloonCtrl \
|
|
|
|
-t ${DESTDIR}/usr/lib/virtualbox
|
|
|
|
|
|
|
|
# locales
|
2010-12-23 13:41:13 +00:00
|
|
|
install -m0755 nls/*.qm -t ${DESTDIR}/usr/share/virtualbox/nls
|
|
|
|
|
2011-07-11 07:14:49 +00:00
|
|
|
# scripts
|
|
|
|
install -m0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh \
|
|
|
|
-t ${DESTDIR}/usr/share/virtualbox
|
|
|
|
|
2011-07-10 19:29:11 +00:00
|
|
|
# icons and desktop
|
2010-12-23 13:41:13 +00: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 07:11:04 +00:00
|
|
|
install -Dm644 virtualbox.xml \
|
|
|
|
${DESTDIR}/usr/share/mime/packages/virtualbox.xml
|
2010-12-23 13:41:13 +00:00
|
|
|
install -d ${DESTDIR}/usr/share/icons/hicolor
|
|
|
|
cp -a icons ${DESTDIR}/usr/share/icons/hicolor
|
|
|
|
|
2011-07-10 19:29:11 +00:00
|
|
|
# configuration file
|
2010-12-23 13:41:13 +00: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 19:29:11 +00:00
|
|
|
|
2011-01-11 15:12:28 +00:00
|
|
|
# Install the OpenRC service.
|
|
|
|
install -D -m755 ${FILESDIR}/virtualbox.rc \
|
|
|
|
${DESTDIR}/etc/init.d/virtualbox
|
2010-12-23 13:41:13 +00:00
|
|
|
}
|