wok-current annotate virtualbox-ose-guestutils/receipt @ rev 16793
Add libjson-dev
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 02 21:08:49 2014 +0200 (2014-07-02) |
parents | 7896f0694ef6 |
children | 38ec9a00ec36 |
rev | line source |
---|---|
monghitri@14054 | 1 # SliTaz package receipt. |
monghitri@14054 | 2 |
monghitri@14054 | 3 PACKAGE="virtualbox-ose-guestutils" |
monghitri@14054 | 4 VERSION="4.2.6" |
monghitri@14054 | 5 CATEGORY="misc" |
monghitri@14054 | 6 SHORT_DESC="VirtualBox Guest userspace utilities, useful for running Slitaz inside a virtual machine" |
monghitri@14054 | 7 MAINTAINER="slaxemulator@gmail.com" |
pascal@15002 | 8 LICENSE="GPL2" |
monghitri@14054 | 9 WANTED="virtualbox-ose" |
monghitri@14054 | 10 WEB_SITE="https://www.virtualbox.org/" |
pascal@16678 | 11 TAGS="virtualization" |
pascal@15002 | 12 |
monghitri@14054 | 13 DEPENDS="xorg-libXfixes xorg-libXmu xorg-xrandr" |
monghitri@14054 | 14 BUILD_DEPENDS="" |
monghitri@14054 | 15 |
monghitri@14054 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
monghitri@14054 | 17 genpkg_rules() |
monghitri@14054 | 18 { |
monghitri@14054 | 19 # virtualbox-ose-additions |
monghitri@14054 | 20 source $src/env.sh |
monghitri@14054 | 21 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" |
monghitri@14054 | 22 mkdir -p $fs/usr/bin |
monghitri@14054 | 23 mkdir -p $fs/sbin |
monghitri@14054 | 24 mkdir -p $fs/etc/X11/xorg.conf.d |
monghitri@14054 | 25 mkdir -p $fs/etc/init.d |
monghitri@14054 | 26 |
monghitri@14054 | 27 install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin" |
monghitri@14054 | 28 install -m755 mount.vboxsf "$fs/sbin" |
monghitri@14054 | 29 |
monghitri@14054 | 30 install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ |
monghitri@14054 | 31 $fs/usr/bin/VBoxClient-all |
monghitri@14054 | 32 install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \ |
monghitri@14054 | 33 $fs/etc/xdg/autostart/vboxclient.desktop |
monghitri@14054 | 34 |
monghitri@14071 | 35 install -D vboxvideo_drv_112.so \ |
monghitri@14054 | 36 "$fs/usr/lib/X11/modules/drivers/vboxvideo.so" |
monghitri@14054 | 37 install -d "$fs/usr/lib/dri" |
monghitri@14054 | 38 install -m755 VBoxOGL*.so "$fs/usr/lib" |
monghitri@14054 | 39 ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so" |
monghitri@14054 | 40 install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so" |
monghitri@14054 | 41 |
monghitri@14054 | 42 # virtualbox-ose-additions-modules |
monghitri@14054 | 43 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g') |
monghitri@14054 | 44 #cooking installs modules in linux major version dir |
monghitri@14054 | 45 KBASEVER="${KERNEL_VERSION:0:3}" |
monghitri@14054 | 46 |
monghitri@14054 | 47 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" |
monghitri@14054 | 48 |
monghitri@14054 | 49 cd vboxguest |
monghitri@14054 | 50 install -D -m644 vboxguest.ko \ |
monghitri@14054 | 51 "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxguest.ko" |
monghitri@14054 | 52 |
monghitri@14054 | 53 cd ../vboxsf |
monghitri@14054 | 54 install -D -m644 vboxsf.ko \ |
monghitri@14054 | 55 "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxsf.ko" |
monghitri@14054 | 56 |
monghitri@14054 | 57 cd ../vboxvideo |
monghitri@14054 | 58 install -D -m644 vboxvideo.ko \ |
monghitri@14054 | 59 "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxvideo.ko" |
monghitri@14054 | 60 |
monghitri@14054 | 61 install -D -m 0644 "$stuff/60-vboxguest.rules" \ |
monghitri@14054 | 62 "$fs/etc/udev/rules.d/60-vboxguest.rules" |
monghitri@14054 | 63 |
monghitri@14054 | 64 install -D -m 0755 "$stuff/VBoxService" \ |
monghitri@14054 | 65 "$fs/etc/init.d/VBoxService" |
monghitri@14054 | 66 } |
monghitri@14054 | 67 |
monghitri@14054 | 68 pre_remove() |
monghitri@14054 | 69 { |
monghitri@14071 | 70 if chroot $1/ lspci | grep -qi virtualbox; then |
monghitri@14071 | 71 sed -i "s/vboxguest vboxsf vboxvideo //" $1/etc/rcS.conf |
monghitri@14071 | 72 sed -i '/# VBoxService daemon options./{N;N;N;d}' $1/etc/daemons.conf |
monghitri@14071 | 73 sed -i 's/VBoxService //' $1/etc/rcS.conf |
monghitri@14071 | 74 chroot $1/ delgroup vboxsf |
monghitri@14071 | 75 sed -i 's/^\tDriver.*$/\tDriver "vesa"/' $1/etc/X11/xorg.conf.d/60-Device.conf |
monghitri@14071 | 76 fi |
monghitri@14054 | 77 } |
monghitri@14054 | 78 |
monghitri@14054 | 79 post_install() |
monghitri@14054 | 80 { |
monghitri@14071 | 81 if chroot $1/ lspci | grep -qi virtualbox; then |
monghitri@14071 | 82 #chroot $1/ udevadm control --reload |
monghitri@14071 | 83 grep -qs VBOXSERVICE_OPTIONS $1/etc/daemons.conf || |
monghitri@14071 | 84 cat >> $1/etc/daemons.conf << "EOT" |
monghitri@14054 | 85 # VBoxService daemon options. |
monghitri@14054 | 86 VBOXSERVICE_OPTIONS="" |
monghitri@14054 | 87 |
monghitri@14054 | 88 EOT |
monghitri@14071 | 89 KERNEL_VERSION=$( chroot $1/ uname -r) |
monghitri@14071 | 90 chroot $1/ depmod -a $KERNEL_VERSION |
monghitri@14071 | 91 #chroot $1/ modprobe -a vboxguest vboxsf vboxvideo |
monghitri@14071 | 92 sed -i 's/^\tDriver.*$/\tDriver "vboxvideo"/' $1/etc/X11/xorg.conf.d/60-Device.conf |
monghitri@14071 | 93 grep -qs vboxguest $1/etc/rcS.conf || |
monghitri@14071 | 94 sed -i 's/LOAD_MODULES="/&vboxguest vboxsf vboxvideo /' $1/etc/rcS.conf |
monghitri@14071 | 95 grep -qs VBoxService $1/etc/rcS.conf || |
monghitri@14071 | 96 sed -i 's/RUN_DAEMONS="/&VBoxService /' $1/etc/rcS.conf |
monghitri@14071 | 97 grep -qs vboxsf $1/etc/group || chroot $1/ addgroup -g 109 vboxsf |
monghitri@14071 | 98 echo "add yourself to vboxsf group if you want to access" |
monghitri@14071 | 99 echo "host shared folder: addgroup $USER vboxsf" |
monghitri@14071 | 100 #i can't get udev to do its work |
monghitri@14071 | 101 #echo "then logout and login again" |
monghitri@14071 | 102 #chroot $1/ /etc/init.d/VBoxService start &> /dev/null |
monghitri@14071 | 103 echo "then reboot" |
monghitri@14071 | 104 else |
monghitri@14071 | 105 echo "this is not a virtual machine," |
monghitri@14071 | 106 echo "i'm useless here and you probably" |
monghitri@14071 | 107 echo "may want to remove me." |
monghitri@14071 | 108 fi |
monghitri@14054 | 109 } |