wok annotate virtualbox-ose/receipt @ rev 25056
linux-wireless: add r8192ee.ko & rtl8821ae.ko
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 06 10:49:51 2022 +0000 (2022-06-06) |
parents | cc07895be981 |
children |
rev | line source |
---|---|
slaxemulator@7064 | 1 # SliTaz package receipt. |
slaxemulator@7064 | 2 |
slaxemulator@7064 | 3 PACKAGE="virtualbox-ose" |
monghitri@14001 | 4 VERSION="4.2.6" |
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" |
pascal@15002 | 8 LICENSE="GPL2" |
slaxemulator@7064 | 9 SOURCE="VirtualBox" |
slaxemulator@7814 | 10 TARBALL="$SOURCE-$VERSION.tar.bz2" |
monghitri@14054 | 11 WEB_SITE="https://www.virtualbox.org/" |
slaxemulator@7064 | 12 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL" |
pascal@16678 | 13 TAGS="virtualization" |
pascal@8969 | 14 PROVIDE="virtualbox" |
slaxemulator@7064 | 15 |
slaxemulator@9841 | 16 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \ |
psychomaniak@17180 | 17 xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa vde2 \ |
pascal@21808 | 18 python libQtCore libQtGui libQtNetwork libQtOpenGL \ |
pascal@21808 | 19 virtualbox-ose-modules" |
pascal@10693 | 20 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \ |
pascal@13796 | 21 libglu-mesa-dev Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \ |
slaxemulator@10578 | 22 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \ |
pascal@10693 | 23 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \ |
pascal@12446 | 24 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev \ |
pascal@18088 | 25 libpng-dev gsoap-dev libdevmapper-dev makeself cdrkit flex" |
slaxemulator@9841 | 26 |
pascal@24083 | 27 current_version() |
pascal@24083 | 28 { |
pascal@24083 | 29 wget -O - http://download.virtualbox.org/virtualbox 2>/dev/null | \ |
pascal@24083 | 30 sed '/href=.[0-9]/!d;s|.*href=.||;s|/.*||' | sort -Vr | sed q |
pascal@24083 | 31 } |
pascal@24083 | 32 |
slaxemulator@7064 | 33 # Rules to configure and make the package. |
slaxemulator@7064 | 34 compile_rules() |
slaxemulator@7064 | 35 { |
pascal@20616 | 36 grep -rl 'uname -m' $src | xargs sed -i 's|\(.\)uname -m|\1echo i486|' |
pascal@20616 | 37 patch -p1 < $stuff/virtualbox-linux.patch |
pascal@21808 | 38 cp $stuff/vbox-cpuhotplug.dsl src/VBox/Devices/PC/ |
pascal@21808 | 39 sed -i '/Wake up on LAN/{NNNNNd};s|S2BF, 1|&, Serialized|' \ |
pascal@21808 | 40 src/VBox/Devices/PC/vbox.dsl |
pascal@21808 | 41 sed -i '/soapvbox\*\.h/d' src/VBox/Main/webservice/Makefile.kmk |
slaxemulator@8715 | 42 cp $stuff/LocalConfig.kmk . |
slaxemulator@7064 | 43 ./configure \ |
slaxemulator@7064 | 44 --disable-pulse \ |
slaxemulator@7814 | 45 --disable-java \ |
slaxemulator@7814 | 46 --disable-docs \ |
slaxemulator@8484 | 47 --enable-webservice \ |
slaxemulator@8715 | 48 --enable-vde \ |
slaxemulator@7064 | 49 --with-linux=/usr/src/linux |
slaxemulator@7064 | 50 source ./env.sh |
pascal@14073 | 51 kmk all 2>&1 | grep -v 'kmk: No such' |
slaxemulator@7064 | 52 |
pascal@21808 | 53 # Prepare modules tree. |
pascal@21808 | 54 mkdir -p $src/out/linux.amd64/release/bin |
pascal@21808 | 55 cp -a $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src \ |
pascal@21808 | 56 $src/out/linux.amd64/release/bin/src |
slaxemulator@7064 | 57 # build guest additions modules |
slaxemulator@7814 | 58 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" |
slaxemulator@7064 | 59 } |
slaxemulator@7064 | 60 |
slaxemulator@7064 | 61 # Rules to gen a SliTaz package suitable for Tazpkg. |
slaxemulator@7064 | 62 genpkg_rules() |
slaxemulator@7064 | 63 { |
slaxemulator@7064 | 64 source $src/env.sh |
slaxemulator@7064 | 65 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin |
slaxemulator@8005 | 66 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \ |
slaxemulator@8715 | 67 $fs/usr/share/virtualbox/nls \ |
slaxemulator@8715 | 68 $fs/usr/lib/virtualbox/ExtensionPacks |
slaxemulator@8715 | 69 install -m 0755 VBox.sh $fs/usr/bin/VBox |
slaxemulator@7064 | 70 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox |
slaxemulator@7064 | 71 ln -sf VBox $fs/usr/bin/VBoxHeadless |
slaxemulator@8715 | 72 ln -sf VBox $fs/usr/bin/vboxheadless |
slaxemulator@7064 | 73 ln -sf VBox $fs/usr/bin/VBoxManage |
slaxemulator@8715 | 74 ln -sf VBox $fs/usr/bin/vboxmanage |
slaxemulator@7064 | 75 ln -sf VBox $fs/usr/bin/VBoxSDL |
slaxemulator@8715 | 76 ln -sf VBox $fs/usr/bin/vboxsdl |
slaxemulator@7064 | 77 ln -sf VBox $fs/usr/bin/VirtualBox |
slaxemulator@8715 | 78 ln -sf VBox $fs/usr/bin/virtualbox |
slaxemulator@8715 | 79 ln -sf VBox $fs/usr/bin/vboxwebsrv |
slaxemulator@7064 | 80 |
slaxemulator@7064 | 81 install -m 0755 VBoxTunctl "$fs/usr/bin" |
slaxemulator@7064 | 82 |
slaxemulator@7064 | 83 # components |
slaxemulator@8715 | 84 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components |
slaxemulator@7064 | 85 |
slaxemulator@7064 | 86 # lib |
slaxemulator@7064 | 87 install -m 0755 *.so "$fs/usr/lib/virtualbox" |
slaxemulator@7064 | 88 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox" |
al@18086 | 89 |
slaxemulator@7064 | 90 #setuid root binaries |
slaxemulator@8715 | 91 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox" |
al@18086 | 92 |
slaxemulator@7064 | 93 #other binaries |
pascal@9071 | 94 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox" |
pascal@9071 | 95 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox" |
slaxemulator@7064 | 96 |
slaxemulator@7064 | 97 #language |
slaxemulator@7064 | 98 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls" |
al@18086 | 99 |
slaxemulator@8715 | 100 #useless scripts |
slaxemulator@8715 | 101 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox" |
slaxemulator@7064 | 102 |
slaxemulator@7064 | 103 #icon |
samuel_trassare@11755 | 104 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png" |
slaxemulator@7064 | 105 |
slaxemulator@7064 | 106 #desktop |
slaxemulator@7064 | 107 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop" |
samuel_trassare@11755 | 108 sed -i "s|VBox.png|virtualbox|" \ |
samuel_trassare@11755 | 109 $fs/usr/share/applications/virtualbox.desktop |
slaxemulator@7064 | 110 |
slaxemulator@7064 | 111 #install configuration |
slaxemulator@7064 | 112 mkdir -p "$fs/etc/vbox" |
slaxemulator@7064 | 113 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg" |
slaxemulator@7064 | 114 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg" |
slaxemulator@7064 | 115 |
slaxemulator@7064 | 116 #udev |
monghitri@14004 | 117 install -D -m 0644 "$stuff/10-vboxdrv.rules" \ |
monghitri@14004 | 118 "$fs/etc/udev/rules.d/10-vboxdrv.rules" |
slaxemulator@7064 | 119 |
slaxemulator@7064 | 120 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ |
slaxemulator@8005 | 121 cd sdk/installer |
slaxemulator@7064 | 122 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs" |
slaxemulator@8010 | 123 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin |
slaxemulator@8005 | 124 cd sdk/bindings/xpcom/python |
slaxemulator@7064 | 125 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ |
slaxemulator@7064 | 126 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py |
slaxemulator@7064 | 127 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py |
slaxemulator@7064 | 128 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py |
slaxemulator@7064 | 129 } |
slaxemulator@7064 | 130 |
slaxemulator@7154 | 131 pre_remove() |
slaxemulator@7154 | 132 { |
pascal@18730 | 133 chroot "$1/" delgroup vboxusers |
slaxemulator@7154 | 134 } |
slaxemulator@7154 | 135 |
slaxemulator@7154 | 136 post_install() |
slaxemulator@7154 | 137 { |
pascal@18730 | 138 #chroot "$1/" udevadm control --reload |
pascal@18730 | 139 grep -qs vboxuser "$1/etc/group" || chroot "$1/" addgroup -g 199 vboxusers |
monghitri@14054 | 140 echo "add yourself to vboxusers group if you want to access" |
monghitri@14054 | 141 echo "host usb devices: addgroup $USER vboxusers" |
monghitri@14054 | 142 #i can't get udev to do its work |
monghitri@14004 | 143 #echo "then logout and login again" |
monghitri@14071 | 144 echo "then reboot" |
slaxemulator@7154 | 145 } |