diff options
author | root <root@rshg054.dnsready.net> | 2011-10-31 23:14:48 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-10-31 23:14:48 +0000 |
commit | 560562e36a27da267f2f4f7989806790192888ef (patch) | |
tree | f2ce7f5442dd17943646b3844614c48750704018 /libre/virtualbox-libre/PKGBUILD | |
parent | f935ebf41c626e4832f86c5f3f7ed1cc35128f6b (diff) |
Mon Oct 31 23:14:48 UTC 2011
Diffstat (limited to 'libre/virtualbox-libre/PKGBUILD')
-rw-r--r-- | libre/virtualbox-libre/PKGBUILD | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/libre/virtualbox-libre/PKGBUILD b/libre/virtualbox-libre/PKGBUILD new file mode 100644 index 000000000..45b870e64 --- /dev/null +++ b/libre/virtualbox-libre/PKGBUILD @@ -0,0 +1,203 @@ +# $Id: PKGBUILD 56698 2011-10-10 18:23:45Z ibiru $ +# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar> +# Changes: +# * Adapt to linux-libre +# * virtualbox-{archlinux,parabola}-* +# * Removed unfree user manual +# * Package with --pkg "virtualbox-parabola-additions virtualbox-parabola-modules" +# Based on +#Maintainer: Ionut Biru <ibiru@archlinux.org> +pkgbase=virtualbox-libre +pkgname=('virtualbox-libre' 'virtualbox-parabola-additions' 'virtualbox-sdk' 'virtualbox-source') +pkgver=4.1.4 +pkgrel=3 +arch=('i686' 'x86_64') +url='http://virtualbox.org' +license=('GPL' 'custom') +makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libxcursor' 'qt' 'libidl2' 'sdl_ttf' 'alsa-lib' 'libpulse' 'libxtst' +'xalan-c' 'sdl' 'libxmu' 'curl' 'python2' 'linux-libre-headers' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'openjdk6' 'gsoap' 'vde2') +[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc') +source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2 + virtualbox-4-makeself-check.patch virtualbox-4-mkisofs-check.patch + 10-vboxdrv.rules vboxdrv-reference.patch LocalConfig.kmk vboxbuild + change_default_driver_dir.patch vbox-service.conf vbox-service.rc) + +_extramodules=extramodules-3.1-LIBRE +_kernver="$(cat /lib/modules/${_extramodules}/version)" + +build() { + cd "$srcdir/VirtualBox-${pkgver}_OSE" + + patch -Np1 -i "$srcdir/vboxdrv-reference.patch" + patch -Np1 -i "$srcdir/change_default_driver_dir.patch" + + cp "$srcdir/LocalConfig.kmk" . + + ./configure --disable-docs \ + --enable-webservice \ + --enable-vde \ + --enable-vnc \ + --nofatal \ + --with-linux=/usr/src/linux-${_kernver} + source ./env.sh + kmk all + sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "out/linux.$BUILD_PLATFORM_ARCH/release/bin/vboxshell.py" +} + +package_virtualbox-libre() { + pkgdesc="Powerful x86 virtualization for enterprise as well as home use" + depends=('virtualbox-modules' 'libxml2' 'libxcursor' 'libidl2' 'libxinerama' 'sdl' 'libxmu' 'curl' 'libvncserver' 'libpng') + optdepends=('qt: for VirtualBox GUI' + 'vde2: Virtual Distributed Ethernet support' + 'virtualbox-sdk: developer kit' + 'virtualbox-source: host kernel source modules for non-stock kernels') + replaces=('virtualbox') + conflicts=('virtualbox') + provides=("virtualbox=$pkgver") + + replaces=('virtualbox-ose') + conflicts=('virtualbox-ose') + install=virtualbox.install + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + mkdir -p "$pkgdir"/usr/{bin,lib/virtualbox/components,lib/virtualbox/ExtensionPacks,share/virtualbox/nls} + + #Binaries and Wrapper with Launchers + install -m 0755 VBox.sh "$pkgdir/usr/bin/VBox" + + for i in VBoxHeadless vboxheadless VBoxManage vboxmanage VBoxSDL vboxsdl VirtualBox virtualbox vboxwebsrv VBoxBalloonCtrl vboxballoonctrl; do + ln -sf VBox "$pkgdir/usr/bin/$i" + done + install -m 0755 VBoxTunctl "$pkgdir/usr/bin" + + #components + install -m 0755 components/* -t "$pkgdir/usr/lib/virtualbox/components" + + #lib + install -m 0755 *.so "$pkgdir/usr/lib/virtualbox" + install -m 0644 *.gc *.r0 VBoxEFI*.fd "$pkgdir/usr/lib/virtualbox" + + #setuid root binaries + install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl -t "$pkgdir/usr/lib/virtualbox" + #other binaries + install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vboxwebsrv webtest -t "$pkgdir/usr/lib/virtualbox" + + #language + install -m 0755 nls/*.qm -t "$pkgdir/usr/share/virtualbox/nls" + + #useless scripts + install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t "$pkgdir/usr/share/virtualbox" + + #icons + install -D -m 0644 VBox.png "$pkgdir/usr/share/pixmaps/VBox.png" + + pushd icons + for i in *; do + install -d "$pkgdir/usr/share/icons/hicolor/$i/mimetypes" + cp $i/* "$pkgdir/usr/share/icons/hicolor/$i/mimetypes" + done + popd + + #desktop + install -D -m 0644 virtualbox.desktop "$pkgdir/usr/share/applications/virtualbox.desktop" + install -D -m 0644 virtualbox.xml "$pkgdir/usr/share/mime/packages/virtualbox.xml" + + #install configuration + mkdir -p "$pkgdir/etc/vbox" + echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg" + + #udev and licence + install -D -m 0644 "$srcdir/VirtualBox-${pkgver}_OSE/COPYING" \ + "$pkgdir/usr/share/licenses/virtualbox/LICENSE" + install -D -m 0644 "$srcdir/10-vboxdrv.rules" \ + "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules" +} + +package_virtualbox-source() { + pkgdesc="VirtualBox kernel modules source" + depends=(linux-libre-headers gcc make) + install=virtualbox-source.install + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + mkdir -p $pkgdir/usr/lib/virtualbox + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + + #sources for modules + cp -r src ${pkgdir}/usr/lib/virtualbox + #install compilation script + install -D -m 755 "${srcdir}/vboxbuild" "${pkgdir}/usr/bin/vboxbuild" +} + +package_virtualbox-sdk() { + pkgdesc="VirtualBox Software Developer Kit (SDK)" + depends=('python2') + + mkdir -p "$pkgdir/usr/lib/virtualbox" + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + + install -D -m 0755 vboxshell.py "$pkgdir/usr/lib/virtualbox/vboxshell.py" + #python sdk + pushd sdk/installer + VBOX_INSTALL_PATH="/usr/lib/virtualbox" python2 vboxapisetup.py install --root "${pkgdir}" + popd + rm -rf sdk/installer + mv sdk "$pkgdir/usr/lib/virtualbox" +} + +package_virtualbox-parabola-additions(){ + pkgdesc="Additions only for Parabola guests (userspace tools)" + depends=("virtualbox-parabola-modules=$pkgver" 'gcc-libs' 'libxmu' 'xorg-xrandr') + replaces=('virtualbox-guest-additions' 'virtualbox-archlinux-additions') + conflicts=('virtualbox-guest-additions' 'virtualbox-archlinux-additions') + provides=("virtualbox-archlinux-additions=${pkgver}") + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" + + install -d "$pkgdir"/{usr/bin,sbin} + install -m755 VBoxClient VBoxControl VBoxService "$pkgdir/usr/bin" + install -m755 mount.vboxsf "$pkgdir/sbin" + + install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ + "$pkgdir"/usr/bin/VBoxClient-all + install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/vboxclient.desktop \ + "$pkgdir"/etc/xdg/autostart/vboxclient.desktop + install -D vboxvideo_drv_111.so \ + "$pkgdir/usr/lib/xorg/modules/drivers/vboxvideo.so" + install -d "$pkgdir/usr/lib/xorg/modules/dri" + install -m755 VBoxOGL*.so "$pkgdir/usr/lib" + ln -s /usr/lib/VBoxOGL.so "$pkgdir/usr/lib/xorg/modules/dri/vboxvideo_dri.so" + install -m755 -D pam_vbox.so "$pkgdir/lib/security/pam_vbox.so" + + # install rc.d script + install -D -m755 "${srcdir}/vbox-service.rc" "${pkgdir}/etc/rc.d/vbox-service" + + # install sample config + install -D -m644 "${srcdir}/vbox-service.conf" "${pkgdir}/etc/conf.d/vbox-service" +} +md5sums=('dc6e6801b3823332b6ca2e9915221aae' + 'bc048d1e58d84ece4a186199ee48d4c8' + '5f85710e0b8606de967716ded7b2d351' + 'cc3f278bc273011aa95277500a76f677' + '78ffa67ff131680f1d2b6f06d4325c5b' + 'a82d698e7868315cdf876cfb02fd2268' + '97e193f050574dd272a38e5ee5ebe62b' + '3c08ad30b89add47d3f45121200a5360' + '778d865e56e31cc592fbfa257fdcfce7') + +md5sums=('dc6e6801b3823332b6ca2e9915221aae' + 'a9f22ccaacb207e0e1c5450fede82d06' + 'b7cbcf89a30c712fed4435dea28d1703' + '5f85710e0b8606de967716ded7b2d351' + 'cc3f278bc273011aa95277500a76f677' + '78ffa67ff131680f1d2b6f06d4325c5b' + 'a82d698e7868315cdf876cfb02fd2268' + '97e193f050574dd272a38e5ee5ebe62b' + '3c08ad30b89add47d3f45121200a5360' + '778d865e56e31cc592fbfa257fdcfce7') |