wok-stable annotate virtualbox-ose/receipt @ rev 7592
Up: transmission to 2.13.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Dec 10 11:45:08 2010 +0000 (2010-12-10) |
parents | 4d423809efb5 |
children | 35354c2b87b9 |
rev | line source |
---|---|
slaxemulator@7064 | 1 # SliTaz package receipt. |
slaxemulator@7064 | 2 |
slaxemulator@7064 | 3 PACKAGE="virtualbox-ose" |
slaxemulator@7474 | 4 VERSION="3.2.12" |
slaxemulator@7064 | 5 CATEGORY="misc" |
slaxemulator@7064 | 6 SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)" |
slaxemulator@7064 | 7 MAINTAINER="slaxemulator@gmail.com" |
slaxemulator@7064 | 8 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa qt4" |
slaxemulator@7064 | 9 BUILD_DEPENDS="bin86 dev86 iasl libxslt-dev libxml2-dev xorg-libXcursor-dev Qt4-dev libIDL libsdl-ttf-dev libsdl-dev alsa-lib-dev hal-dev xorg-libXtst-dev xorg-libXinerama-dev xorg-libXrandr-dev xorg-libXmu-dev curl-dev python python-dev mesa-dev libglu-mesa xalan-c xalan-c-dev xerces-c-dev openssl-dev libpng-dev jpeg-dev zlib-dev libvncserver-dev libcap-dev glib-dev pam pam-dev linux-module-headers pkg-config" |
slaxemulator@7064 | 10 SOURCE="VirtualBox" |
slaxemulator@7064 | 11 TARBALL="$SOURCE-$VERSION-OSE.tar.bz2" |
slaxemulator@7064 | 12 WEB_SITE="http://virtualbox.org/" |
slaxemulator@7064 | 13 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL" |
slaxemulator@7154 | 14 MODULE_LIST="vboxdrv vboxnetadp vboxnetflt" |
slaxemulator@7064 | 15 |
slaxemulator@7064 | 16 # Rules to configure and make the package. |
slaxemulator@7064 | 17 compile_rules() |
slaxemulator@7064 | 18 { |
slaxemulator@7064 | 19 src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE |
slaxemulator@7064 | 20 cd $src |
slaxemulator@7064 | 21 |
slaxemulator@7064 | 22 patch -Np1 -i ../stuff/VirtualBox-3.2.0-gcc-4.5-warning-workaround.patch |
slaxemulator@7474 | 23 patch -Np1 -i ../stuff/fix_build.patch |
slaxemulator@7064 | 24 cp ../stuff/LocalConfig.kmk . |
slaxemulator@7064 | 25 ./configure \ |
slaxemulator@7064 | 26 --disable-pulse \ |
slaxemulator@7064 | 27 --with-linux=/usr/src/linux |
slaxemulator@7064 | 28 source ./env.sh |
slaxemulator@7064 | 29 kmk all |
slaxemulator@7064 | 30 |
slaxemulator@7064 | 31 # build modules |
slaxemulator@7064 | 32 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src |
slaxemulator@7064 | 33 KERN_DIR=/usr/src/linux make |
slaxemulator@7064 | 34 # build guest additions modules |
slaxemulator@7064 | 35 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src |
slaxemulator@7064 | 36 KERN_DIR=/usr/src/linux make |
slaxemulator@7064 | 37 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src/vboxvideo |
slaxemulator@7064 | 38 KERN_DIR=/usr/src/linux make |
slaxemulator@7064 | 39 } |
slaxemulator@7064 | 40 |
slaxemulator@7064 | 41 # Rules to gen a SliTaz package suitable for Tazpkg. |
slaxemulator@7064 | 42 genpkg_rules() |
slaxemulator@7064 | 43 { |
slaxemulator@7064 | 44 src=$WOK/$PACKAGE/$SOURCE-${VERSION}_OSE |
slaxemulator@7064 | 45 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs |
slaxemulator@7064 | 46 stuff=$WOK/$PACKAGE/stuff |
slaxemulator@7064 | 47 |
slaxemulator@7064 | 48 source $src/env.sh |
slaxemulator@7064 | 49 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin |
slaxemulator@7064 | 50 mkdir -p "$fs"/usr/{bin,lib/virtualbox/components,share/virtualbox/nls} |
slaxemulator@7064 | 51 cp -a VBox.sh $fs/usr/bin/VBox |
slaxemulator@7064 | 52 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox |
slaxemulator@7064 | 53 ln -sf VBox $fs/usr/bin/VBoxHeadless |
slaxemulator@7064 | 54 ln -sf VBox $fs/usr/bin/VBoxManage |
slaxemulator@7064 | 55 ln -sf VBox $fs/usr/bin/VBoxSDL |
slaxemulator@7064 | 56 ln -sf VBox $fs/usr/bin/VirtualBox |
slaxemulator@7064 | 57 |
slaxemulator@7064 | 58 install -m 0755 VBoxTunctl "$fs/usr/bin" |
slaxemulator@7064 | 59 |
slaxemulator@7064 | 60 # components |
slaxemulator@7064 | 61 cp -a components/* $fs/usr/lib/virtualbox/components |
slaxemulator@7064 | 62 |
slaxemulator@7064 | 63 # lib |
slaxemulator@7064 | 64 install -m 0755 *.so "$fs/usr/lib/virtualbox" |
slaxemulator@7064 | 65 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox" |
slaxemulator@7064 | 66 |
slaxemulator@7064 | 67 #setuid root binaries |
slaxemulator@7064 | 68 install -m 4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl VirtualBox VBoxBFE "$fs/usr/lib/virtualbox" |
slaxemulator@7064 | 69 |
slaxemulator@7064 | 70 #other binaries |
slaxemulator@7064 | 71 install -m 0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxSysInfo.sh xpidl \ |
slaxemulator@7064 | 72 VBoxTestOGL EfiThunk "$fs/usr/lib/virtualbox" |
slaxemulator@7064 | 73 |
slaxemulator@7064 | 74 #language |
slaxemulator@7064 | 75 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls" |
slaxemulator@7064 | 76 |
slaxemulator@7064 | 77 #icon |
slaxemulator@7064 | 78 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/VBox.png" |
slaxemulator@7064 | 79 |
slaxemulator@7064 | 80 #desktop |
slaxemulator@7064 | 81 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop" |
slaxemulator@7064 | 82 |
slaxemulator@7064 | 83 #install configuration |
slaxemulator@7064 | 84 mkdir -p "$fs/etc/vbox" |
slaxemulator@7064 | 85 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg" |
slaxemulator@7064 | 86 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg" |
slaxemulator@7064 | 87 |
slaxemulator@7064 | 88 #udev |
slaxemulator@7064 | 89 install -D -m 0644 "$stuff/60-virtualbox.rules" \ |
slaxemulator@7064 | 90 "$fs/etc/udev/rules.d/60-virtualbox.rules" |
slaxemulator@7064 | 91 |
slaxemulator@7064 | 92 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ |
slaxemulator@7064 | 93 pushd sdk/installer |
slaxemulator@7064 | 94 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs" |
slaxemulator@7064 | 95 popd |
slaxemulator@7064 | 96 pushd sdk/bindings/xpcom/python |
slaxemulator@7064 | 97 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ |
slaxemulator@7064 | 98 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py |
slaxemulator@7064 | 99 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py |
slaxemulator@7064 | 100 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py |
slaxemulator@7064 | 101 popd |
slaxemulator@7064 | 102 |
slaxemulator@7064 | 103 # virtualbox-modules |
slaxemulator@7064 | 104 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
slaxemulator@7064 | 105 |
slaxemulator@7064 | 106 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" |
slaxemulator@7064 | 107 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko" |
slaxemulator@7064 | 108 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko" |
slaxemulator@7064 | 109 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko" |
slaxemulator@7064 | 110 |
slaxemulator@7064 | 111 # virtualbox-ose-additions |
slaxemulator@7064 | 112 |
slaxemulator@7064 | 113 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" |
slaxemulator@7064 | 114 mkdir -p $fs/usr/bin |
slaxemulator@7064 | 115 mkdir -p $fs/sbin |
slaxemulator@7064 | 116 mkdir -p $fs/etc/X11/xorg.conf.d |
slaxemulator@7064 | 117 |
slaxemulator@7064 | 118 install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin" |
slaxemulator@7064 | 119 install -m755 mount.vboxsf "$fs/sbin" |
slaxemulator@7064 | 120 |
slaxemulator@7064 | 121 install -m644 $src/src/VBox/Additions/x11/Installer/50-vboxmouse.conf \ |
slaxemulator@7064 | 122 $fs/etc/X11/xorg.conf.d/50-vboxmouse.conf |
slaxemulator@7064 | 123 |
slaxemulator@7064 | 124 install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ |
slaxemulator@7064 | 125 $fs/usr/bin/VBoxClient-all |
slaxemulator@7064 | 126 install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \ |
slaxemulator@7064 | 127 $fs/etc/xdg/autostart/vboxclient.desktop |
slaxemulator@7064 | 128 |
slaxemulator@7064 | 129 install -D vboxmouse_drv_19.so \ |
slaxemulator@7391 | 130 "$fs/usr/lib/X11/modules/input/vboxmouse.so" |
slaxemulator@7064 | 131 install -D vboxvideo_drv_19.so \ |
slaxemulator@7391 | 132 "$fs/usr/lib/X11/modules/drivers/vboxvideo.so" |
slaxemulator@7064 | 133 install -d "$fs/usr/lib/dri" |
slaxemulator@7064 | 134 install -m755 VBoxOGL*.so "$fs/usr/lib" |
slaxemulator@7064 | 135 ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so" |
slaxemulator@7064 | 136 install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so" |
slaxemulator@7064 | 137 |
slaxemulator@7064 | 138 # virtualbox-ose-additions-modules |
slaxemulator@7064 | 139 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" |
slaxemulator@7064 | 140 |
slaxemulator@7064 | 141 cd vboxguest |
slaxemulator@7064 | 142 install -D -m644 vboxguest.ko \ |
slaxemulator@7064 | 143 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko" |
slaxemulator@7064 | 144 |
slaxemulator@7064 | 145 cd ../vboxsf |
slaxemulator@7064 | 146 install -D -m644 vboxsf.ko \ |
slaxemulator@7064 | 147 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko" |
slaxemulator@7064 | 148 |
slaxemulator@7064 | 149 cd ../vboxvideo |
slaxemulator@7064 | 150 install -D -m644 vboxvideo.ko \ |
slaxemulator@7064 | 151 "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko" |
slaxemulator@7064 | 152 |
slaxemulator@7064 | 153 install -D -m 0644 "$stuff/60-vboxguest.rules" \ |
slaxemulator@7064 | 154 "$fs/etc/udev/rules.d/60-vboxguest.rules" |
slaxemulator@7064 | 155 } |
slaxemulator@7064 | 156 |
slaxemulator@7154 | 157 pre_remove() |
slaxemulator@7154 | 158 { |
slaxemulator@7154 | 159 sed -i 's/$MODULE_LIST //' $1/etc/rcS.conf |
slaxemulator@7154 | 160 } |
slaxemulator@7154 | 161 |
slaxemulator@7154 | 162 post_install() |
slaxemulator@7154 | 163 { |
slaxemulator@7154 | 164 KERNEL_VERSION=`grep ^VERSION= $1/var/lib/tazpkg/installed/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
slaxemulator@7154 | 165 |
slaxemulator@7159 | 166 chroot "$1/" depmod -a $KERNEL_VERSION-slitaz |
slaxemulator@7154 | 167 [ -n "$1" ] || for i in $MODULE_LIST; do modprobe $i ; done |
slaxemulator@7154 | 168 grep -qs vboxdrv $1/etc/rcS.conf || |
slaxemulator@7154 | 169 sed -i 's/LOAD_MODULES="/&$MODULE_LIST /' $1/etc/rcS.conf |
slaxemulator@7154 | 170 } |