129 lines
4.2 KiB
Text
129 lines
4.2 KiB
Text
# Template file for 'virtualbox-ose'
|
|
pkgname=virtualbox-ose
|
|
_vbox_distver=4.1.10
|
|
version=${_vbox_distver}
|
|
wrksrc="VirtualBox-${version}"
|
|
patch_args="-Np1"
|
|
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
|
|
short_desc="General-purpose full virtualizer for x86 hardware"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="http://virtualbox.org"
|
|
license="GPL-2, MPL-1.1, CDDL"
|
|
checksum=47e3faa607b405ea1d31e65a35984374e44f09f44a0f40607da6a773b31a57bf
|
|
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."
|
|
|
|
system_groups="vboxusers"
|
|
gtk_iconcache_dirs="/usr/share/icons/hicolor"
|
|
subpackages="${pkgname}-dkms ${pkgname}-guest ${pkgname}-guest-dkms"
|
|
systemd_services="virtualbox.service on"
|
|
|
|
Add_dependency run ${pkgname}-dkms ">=${version}"
|
|
Add_dependency run hicolor-icon-theme
|
|
Add_dependency run desktop-file-utils
|
|
|
|
Add_dependency build which
|
|
Add_dependency build openssl-devel
|
|
Add_dependency build libcurl-devel
|
|
Add_dependency build libpng-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
|
|
Add_dependency build libXrandr-devel
|
|
Add_dependency build libXcomposite-devel
|
|
Add_dependency build MesaLib-devel
|
|
Add_dependency build libIDL-devel
|
|
Add_dependency build glib-devel
|
|
Add_dependency build pam-devel
|
|
Add_dependency build pulseaudio-devel
|
|
Add_dependency build libxslt-devel
|
|
Add_dependency build libcap-devel
|
|
Add_dependency build xorg-server-devel
|
|
Add_dependency build docbook-xsl
|
|
Add_dependency build acpica-utils
|
|
Add_dependency build kernel-headers
|
|
Add_dependency build dev86
|
|
Add_dependency build yasm
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
Add_dependency build gcc-c++-multilib
|
|
fi
|
|
|
|
do_build() {
|
|
local _khdrver=$($XBPS_PKGDB_CMD version kernel-headers)
|
|
|
|
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
|
|
source ./env.sh
|
|
kmk ${makejobs} all
|
|
}
|
|
|
|
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
|
|
for f in VirtualBox VBoxManage VBoxSDL VBoxHeadless \
|
|
VBoxBalloonCtrl; do
|
|
ln -sf VBox ${DESTDIR}/usr/bin/${f}
|
|
done
|
|
# comoonents
|
|
install -m0755 components/* -t ${DESTDIR}/usr/lib/virtualbox/components
|
|
|
|
# libs
|
|
install -m0755 *.so ${DESTDIR}/usr/lib/virtualbox
|
|
install -m0644 *.gc *.r0 *.fd ${DESTDIR}/usr/lib/virtualbox
|
|
|
|
# setuid
|
|
install -m4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl \
|
|
VirtualBox VBoxBFE -t ${DESTDIR}/usr/lib/virtualbox
|
|
|
|
install -m0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD \
|
|
VBoxTestOGL VBoxBalloonCtrl \
|
|
-t ${DESTDIR}/usr/lib/virtualbox
|
|
|
|
# locales
|
|
install -m0755 nls/*.qm -t ${DESTDIR}/usr/share/virtualbox/nls
|
|
|
|
# scripts
|
|
install -m0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh \
|
|
-t ${DESTDIR}/usr/share/virtualbox
|
|
|
|
# icons and desktop
|
|
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
|
|
install -Dm644 virtualbox.xml \
|
|
${DESTDIR}/usr/share/mime/packages/virtualbox.xml
|
|
install -d ${DESTDIR}/usr/share/icons/hicolor
|
|
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
|
|
|
|
# configuration file
|
|
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}
|
|
|
|
# Install systemd unit.
|
|
vinstall ${FILESDIR}/virtualbox.service 644 lib/systemd/system
|
|
}
|