2010-12-23 13:41:13 +00:00
|
|
|
# Template file for 'virtualbox-ose'
|
|
|
|
pkgname=virtualbox-ose
|
2013-12-21 16:16:42 +00:00
|
|
|
_vbox_distver=4.3.6
|
2011-01-19 19:51:38 +00:00
|
|
|
version=${_vbox_distver}
|
2013-12-29 09:31:58 +00:00
|
|
|
revision=2
|
2012-03-14 15:49:06 +00:00
|
|
|
wrksrc="VirtualBox-${version}"
|
2011-07-10 19:29:11 +00:00
|
|
|
patch_args="-Np1"
|
2012-12-20 06:24:14 +00:00
|
|
|
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"
|
|
|
|
distfiles="http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version.tar.bz2"
|
2013-12-21 16:16:42 +00:00
|
|
|
checksum=c547e1e32e0b06fba9ee4ca7842f8ddee8e94c64aab17c2b0d0793f0caccbb27
|
2012-12-20 06:24:14 +00:00
|
|
|
|
2013-06-10 07:01:41 +00:00
|
|
|
only_for_archs="i686 x86_64"
|
|
|
|
|
2013-10-15 15:52:49 +00:00
|
|
|
hostmakedepends="which perl pkg-config dev86 yasm acpica-utils"
|
|
|
|
makedepends="openssl-devel libcurl-devel libpng-devel>=1.6 libvpx-devel
|
2013-04-15 14:21:19 +00:00
|
|
|
alsa-lib-devel pulseaudio-devel SDL-devel qt-devel libXcursor-devel
|
|
|
|
libXinerama-devel libXcomposite-devel libIDL-devel libglib-devel
|
2013-12-29 09:31:58 +00:00
|
|
|
pam-devel python-devel libxslt-devel libcap-devel xorg-server-devel>=1.15<1.16
|
2014-02-02 08:34:38 +00:00
|
|
|
device-mapper-devel docbook-xsl shadow"
|
2012-12-20 06:24:14 +00:00
|
|
|
|
2013-04-14 14:51:01 +00:00
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
|
|
|
makedepends+=" gcc-c++-multilib"
|
2012-05-23 18:58:45 +00:00
|
|
|
fi
|
2012-10-05 16:29:09 +00:00
|
|
|
|
2014-02-02 08:34:38 +00:00
|
|
|
depends="
|
|
|
|
virtualbox-ose-dkms-${version}_${revision}
|
|
|
|
hicolor-icon-theme
|
|
|
|
desktop-file-utils
|
|
|
|
shadow"
|
|
|
|
system_groups="vboxusers"
|
|
|
|
|
2013-10-16 09:17:54 +00:00
|
|
|
do_configure() {
|
|
|
|
# Use our path for dri drivers.
|
|
|
|
sed -e 's,/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri,/usr/lib/xorg/modules/drivers,g' \
|
|
|
|
-i src/VBox/Additions/common/crOpenGL/fakedri_drv.c
|
|
|
|
|
2012-03-14 15:49:06 +00:00
|
|
|
cp ${FILESDIR}/LocalConfig.kmk .
|
2012-10-21 06:16:58 +00:00
|
|
|
ln -s /bin/echo makeself
|
|
|
|
|
2012-03-14 15:49:06 +00:00
|
|
|
./configure --disable-docs --disable-java --enable-vde \
|
2013-09-13 07:18:33 +00:00
|
|
|
--disable-python --disable-kmods --nofatal
|
2013-10-16 09:17:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
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
|
|
|
}
|
|
|
|
|
2012-03-14 15:49:06 +00:00
|
|
|
do_install() {
|
2010-12-23 13:41:13 +00: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 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 \
|
2013-10-15 15:52:49 +00:00
|
|
|
VirtualBox -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
|
2011-10-03 12:48:55 +00: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 13:41:13 +00:00
|
|
|
|
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
|
|
|
|
2012-09-15 14:53:54 +00:00
|
|
|
# Install modules-load.d file.
|
|
|
|
vinstall ${FILESDIR}/virtualbox.conf 644 usr/lib/modules-load.d
|
2010-12-23 13:41:13 +00:00
|
|
|
}
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
virtualbox-ose-dkms_package() {
|
2013-04-30 10:00:55 +00:00
|
|
|
short_desc+=" - kernel module sources for dkms"
|
2013-04-14 14:51:01 +00:00
|
|
|
dkms_modules="virtualbox-ose ${_vbox_distver}"
|
|
|
|
depends="dkms"
|
|
|
|
noarch=yes
|
|
|
|
|
|
|
|
pkg_install() {
|
2013-04-15 15:06:02 +00:00
|
|
|
source ${wrksrc}/env.sh
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src
|
|
|
|
local _osedir=${PKGDESTDIR}/usr/src/${sourcepkg}-${version}
|
|
|
|
|
|
|
|
install -d ${_osedir}
|
|
|
|
cp -a . ${_osedir}
|
|
|
|
rm -f ${_osedir}/do_dkms
|
|
|
|
install -m644 ${FILESDIR}/${sourcepkg}-dkms.dkms ${_osedir}/dkms.conf
|
|
|
|
vinstall ${FILESDIR}/${sourcepkg}-dkms.udev 644 \
|
|
|
|
usr/lib/udev/rules.d 60-virtualbox-ose-dkms.rules
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualbox-ose-guest_package() {
|
|
|
|
systemd_services="vboxservice.service on"
|
2013-12-29 09:31:58 +00:00
|
|
|
depends="xserver-abi-video-15_1 virtualbox-ose-guest-dkms-${version}_${revision}"
|
2013-04-30 10:00:55 +00:00
|
|
|
short_desc+=" - guest utilities"
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
pkg_install() {
|
2013-04-15 15:06:02 +00:00
|
|
|
source ${wrksrc}/env.sh
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions
|
2013-10-15 15:52:49 +00:00
|
|
|
vmkdir usr/bin
|
|
|
|
vmkdir usr/sbin
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
install -m755 VBoxClient VBoxControl VBoxService ${PKGDESTDIR}/usr/bin
|
|
|
|
install -m755 mount.vboxsf ${PKGDESTDIR}/usr/sbin
|
|
|
|
install -Dm755 ${wrksrc}/src/VBox/Additions/x11/Installer/vboxclient.desktop \
|
|
|
|
${PKGDESTDIR}/etc/xdg/autostart/vboxclient.desktop
|
|
|
|
|
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions
|
2013-06-10 07:32:22 +00:00
|
|
|
install -D vboxvideo_drv.so \
|
2013-04-14 14:51:01 +00:00
|
|
|
${PKGDESTDIR}/usr/lib/xorg/modules/drivers/vboxvideo.so
|
2013-10-15 15:52:49 +00:00
|
|
|
install -d ${PKGDESTDIR}/usr/lib/xorg/modules/drivers
|
2013-04-14 14:51:01 +00:00
|
|
|
install -m755 VBoxOGL*.so ${PKGDESTDIR}/usr/lib
|
|
|
|
ln -sf /usr/lib/VBoxOGL.so \
|
2013-10-15 15:52:49 +00:00
|
|
|
${PKGDESTDIR}/usr/lib/xorg/modules/drivers/vboxvideo_dri.so
|
2013-04-14 14:51:01 +00:00
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions
|
|
|
|
install -Dm755 pam_vbox.so ${PKGDESTDIR}/usr/lib/security/pam_vbox.so
|
|
|
|
|
|
|
|
vinstall ${FILESDIR}/virtualbox-guest.conf 644 usr/lib/modules-load.d
|
|
|
|
vinstall ${FILESDIR}/vboxservice.service 644 usr/lib/systemd/system
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualbox-ose-guest-dkms_package() {
|
2013-04-30 10:00:55 +00:00
|
|
|
short_desc+=" - guest addition module source for dkms"
|
2013-04-14 14:51:01 +00:00
|
|
|
dkms_modules="virtualbox-ose-guest ${_vbox_distver}"
|
|
|
|
depends="dkms"
|
|
|
|
noarch=yes
|
|
|
|
|
|
|
|
pkg_install() {
|
2013-04-15 15:06:02 +00:00
|
|
|
source ${wrksrc}/env.sh
|
2013-04-14 14:51:01 +00:00
|
|
|
|
|
|
|
cd ${wrksrc}/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src
|
|
|
|
local _guestdir=${PKGDESTDIR}/usr/src/${sourcepkg}-guest-${version}
|
|
|
|
|
|
|
|
install -d ${_guestdir}
|
|
|
|
cp -a . ${_guestdir}
|
|
|
|
rm -f ${_guestdir}/do_dkms
|
|
|
|
install -m644 ${FILESDIR}/${sourcepkg}-guest-dkms.dkms \
|
|
|
|
${_guestdir}/dkms.conf
|
|
|
|
vinstall ${FILESDIR}/${sourcepkg}-guest-dkms.udev 644 \
|
|
|
|
usr/lib/udev/rules.d 60-virtualbox-ose-guest-dkms.rules
|
|
|
|
}
|
|
|
|
}
|