wok-next diff virtualbox-ose/receipt @ rev 20464
Combine receipts (final)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Mar 07 19:43:44 2018 +0200 (2018-03-07) |
parents | dd145c435e4b |
children | c0521c689857 |
line diff
1.1 --- a/virtualbox-ose/receipt Wed Feb 28 17:32:31 2018 +0200 1.2 +++ b/virtualbox-ose/receipt Wed Mar 07 19:43:44 2018 +0200 1.3 @@ -1,31 +1,26 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="virtualbox-ose" 1.8 VERSION="4.2.6" 1.9 CATEGORY="misc" 1.10 -SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)" 1.11 +SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use \ 1.12 +(Open Source Edition)" 1.13 MAINTAINER="slaxemulator@gmail.com" 1.14 LICENSE="GPL2" 1.15 -SOURCE="VirtualBox" 1.16 -TARBALL="$SOURCE-$VERSION.tar.bz2" 1.17 WEB_SITE="https://www.virtualbox.org/" 1.18 + 1.19 +TARBALL="VirtualBox-$VERSION.tar.bz2" 1.20 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL" 1.21 -TAGS="virtualization" 1.22 -PROVIDE="virtualbox" 1.23 1.24 -DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \ 1.25 -xorg-libXmu curl libvncserver libpng16 jpeg mesa libglu-mesa vde2 \ 1.26 -python libQtCore libQtGui libQtNetwork libQtOpenGL" 1.27 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \ 1.28 libglu-mesa-dev Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \ 1.29 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \ 1.30 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \ 1.31 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev \ 1.32 libpng16-dev gsoap-dev libdevmapper-dev makeself cdrkit flex" 1.33 +SPLIT="virtualbox-ose-guestutils" 1.34 1.35 -# Rules to configure and make the package. 1.36 -compile_rules() 1.37 -{ 1.38 +compile_rules() { 1.39 cp $stuff/LocalConfig.kmk . 1.40 ./configure \ 1.41 --disable-pulse \ 1.42 @@ -43,93 +38,148 @@ 1.43 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" 1.44 } 1.45 1.46 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.47 -genpkg_rules() 1.48 -{ 1.49 - source $src/env.sh 1.50 - cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 1.51 - mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \ 1.52 - $fs/usr/share/virtualbox/nls \ 1.53 - $fs/usr/lib/virtualbox/ExtensionPacks 1.54 - install -m 0755 VBox.sh $fs/usr/bin/VBox 1.55 - sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox 1.56 - ln -sf VBox $fs/usr/bin/VBoxHeadless 1.57 - ln -sf VBox $fs/usr/bin/vboxheadless 1.58 - ln -sf VBox $fs/usr/bin/VBoxManage 1.59 - ln -sf VBox $fs/usr/bin/vboxmanage 1.60 - ln -sf VBox $fs/usr/bin/VBoxSDL 1.61 - ln -sf VBox $fs/usr/bin/vboxsdl 1.62 - ln -sf VBox $fs/usr/bin/VirtualBox 1.63 - ln -sf VBox $fs/usr/bin/virtualbox 1.64 - ln -sf VBox $fs/usr/bin/vboxwebsrv 1.65 +genpkg_rules() { 1.66 + case $PACKAGE in 1.67 + virtualbox-ose) 1.68 + source $src/env.sh 1.69 + cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 1.70 + mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \ 1.71 + $fs/usr/share/virtualbox/nls \ 1.72 + $fs/usr/lib/virtualbox/ExtensionPacks 1.73 + install -m 0755 VBox.sh $fs/usr/bin/VBox 1.74 + sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox 1.75 + ln -sf VBox $fs/usr/bin/VBoxHeadless 1.76 + ln -sf VBox $fs/usr/bin/vboxheadless 1.77 + ln -sf VBox $fs/usr/bin/VBoxManage 1.78 + ln -sf VBox $fs/usr/bin/vboxmanage 1.79 + ln -sf VBox $fs/usr/bin/VBoxSDL 1.80 + ln -sf VBox $fs/usr/bin/vboxsdl 1.81 + ln -sf VBox $fs/usr/bin/VirtualBox 1.82 + ln -sf VBox $fs/usr/bin/virtualbox 1.83 + ln -sf VBox $fs/usr/bin/vboxwebsrv 1.84 1.85 - install -m 0755 VBoxTunctl "$fs/usr/bin" 1.86 + install -m 0755 VBoxTunctl "$fs/usr/bin" 1.87 1.88 - # components 1.89 - install -D -m 0755 components/* $fs/usr/lib/virtualbox/components 1.90 + # components 1.91 + install -D -m 0755 components/* $fs/usr/lib/virtualbox/components 1.92 1.93 - # lib 1.94 - install -m 0755 *.so "$fs/usr/lib/virtualbox" 1.95 - install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox" 1.96 + # lib 1.97 + install -m 0755 *.so "$fs/usr/lib/virtualbox" 1.98 + install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox" 1.99 1.100 - #setuid root binaries 1.101 - install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox" 1.102 + #setuid root binaries 1.103 + install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox" 1.104 1.105 - #other binaries 1.106 - #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox" 1.107 - install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox" 1.108 + #other binaries 1.109 + #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox" 1.110 + install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox" 1.111 1.112 - #language 1.113 - install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls" 1.114 + #language 1.115 + install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls" 1.116 1.117 - #useless scripts 1.118 - install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox" 1.119 + #useless scripts 1.120 + install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox" 1.121 1.122 - #icon 1.123 - install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png" 1.124 + #icon 1.125 + install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png" 1.126 1.127 - #desktop 1.128 - install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop" 1.129 - sed -i "s|VBox.png|virtualbox|" \ 1.130 - $fs/usr/share/applications/virtualbox.desktop 1.131 + #desktop 1.132 + install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop" 1.133 + sed -i "s|VBox.png|virtualbox|" \ 1.134 + $fs/usr/share/applications/virtualbox.desktop 1.135 1.136 - #install configuration 1.137 - mkdir -p "$fs/etc/vbox" 1.138 - echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg" 1.139 - echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg" 1.140 + #install configuration 1.141 + mkdir -p "$fs/etc/vbox" 1.142 + echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg" 1.143 + echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg" 1.144 1.145 - #udev 1.146 - install -D -m 0644 "$stuff/10-vboxdrv.rules" \ 1.147 - "$fs/etc/udev/rules.d/10-vboxdrv.rules" 1.148 + #udev 1.149 + install -D -m 0644 "$stuff/10-vboxdrv.rules" \ 1.150 + "$fs/etc/udev/rules.d/10-vboxdrv.rules" 1.151 1.152 - mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ 1.153 - cd sdk/installer 1.154 - VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs" 1.155 - cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 1.156 - cd sdk/bindings/xpcom/python 1.157 - cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ 1.158 - chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py 1.159 - chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py 1.160 - chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py 1.161 - cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 1.162 + mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ 1.163 + cd sdk/installer 1.164 + VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs" 1.165 + cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 1.166 + cd sdk/bindings/xpcom/python 1.167 + cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/ 1.168 + chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py 1.169 + chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py 1.170 + chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py 1.171 + cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin 1.172 1.173 - # virtualbox-ose-modules 1.174 - KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g') 1.175 + # virtualbox-ose-modules 1.176 + KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g') 1.177 1.178 - cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" 1.179 - install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko" 1.180 - install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko" 1.181 - install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko" 1.182 + cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" 1.183 + install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko" 1.184 + install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko" 1.185 + install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko" 1.186 + DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \ 1.187 + xorg-libXmu curl libvncserver libpng16 jpeg mesa libglu-mesa vde2 \ 1.188 + python libQtCore libQtGui libQtNetwork libQtOpenGL" 1.189 + TAGS="virtualization" 1.190 + PROVIDE="virtualbox" 1.191 + ;; 1.192 + virtualbox-ose-guestutils) 1.193 + # virtualbox-ose-additions 1.194 + source $src/env.sh 1.195 + cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" 1.196 + mkdir -p $fs/usr/bin 1.197 + mkdir -p $fs/sbin 1.198 + mkdir -p $fs/etc/X11/xorg.conf.d 1.199 + mkdir -p $fs/etc/init.d 1.200 + 1.201 + install -m755 VBoxClient VBoxControl VBoxService "$fs/usr/bin" 1.202 + install -m755 mount.vboxsf "$fs/sbin" 1.203 + 1.204 + install -m755 -D $src/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ 1.205 + $fs/usr/bin/VBoxClient-all 1.206 + install -m755 -D $src/src/VBox/Additions/x11/Installer/vboxclient.desktop \ 1.207 + $fs/etc/xdg/autostart/vboxclient.desktop 1.208 + 1.209 + install -D vboxvideo_drv_112.so \ 1.210 + "$fs/usr/lib/X11/modules/drivers/vboxvideo.so" 1.211 + install -d "$fs/usr/lib/dri" 1.212 + install -m755 VBoxOGL*.so "$fs/usr/lib" 1.213 + ln -s /usr/lib/VBoxOGL.so "$fs/usr/lib/dri/vboxvideo_dri.so" 1.214 + install -m755 -D pam_vbox.so "$fs/lib/security/pam_vbox.so" 1.215 + 1.216 + # virtualbox-ose-additions-modules 1.217 + KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g') 1.218 + 1.219 + cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" 1.220 + 1.221 + cd vboxguest 1.222 + install -D -m644 vboxguest.ko \ 1.223 + "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxguest.ko" 1.224 + 1.225 + cd ../vboxsf 1.226 + install -D -m644 vboxsf.ko \ 1.227 + "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxsf.ko" 1.228 + 1.229 + cd ../vboxvideo 1.230 + install -D -m644 vboxvideo.ko \ 1.231 + "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxvideo.ko" 1.232 + 1.233 + install -D -m 0644 "$stuff/60-vboxguest.rules" \ 1.234 + "$fs/etc/udev/rules.d/60-vboxguest.rules" 1.235 + 1.236 + install -D -m 0755 "$stuff/VBoxService" \ 1.237 + "$fs/etc/init.d/VBoxService" 1.238 + CAT="misc|VirtualBox Guest userspace utilities, useful for running Slitaz inside a virtual machine" 1.239 + DEPENDS="xorg-libXfixes xorg-libXmu xorg-xrandr" 1.240 + TAGS="virtualization" 1.241 + ;; 1.242 + esac 1.243 } 1.244 1.245 -pre_remove() 1.246 -{ 1.247 +pre_remove_virtualbox_ose() { 1.248 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" "$1/etc/rcS.conf" 1.249 chroot "$1/" delgroup vboxusers 1.250 } 1.251 1.252 -post_install() 1.253 -{ 1.254 +post_install_virtualbox_ose() { 1.255 #chroot "$1/" udevadm control --reload 1.256 KERNEL_VERSION=$( chroot "$1/" uname -r) 1.257 chroot "$1/" depmod -a $KERNEL_VERSION 1.258 @@ -143,3 +193,45 @@ 1.259 #echo "then logout and login again" 1.260 echo "then reboot" 1.261 } 1.262 + 1.263 +pre_remove_virtualbox_ose_guestutils() { 1.264 + if chroot "$1/" lspci | grep -qi virtualbox; then 1.265 + sed -i "s/vboxguest vboxsf vboxvideo //" "$1/etc/rcS.conf" 1.266 + sed -i '/# VBoxService daemon options./{N;N;N;d}' "$1/etc/daemons.conf" 1.267 + sed -i 's/VBoxService //' "$1/etc/rcS.conf" 1.268 + chroot "$1/" delgroup vboxsf 1.269 + sed -i 's/^\tDriver.*$/\tDriver "vesa"/' "$1/etc/X11/xorg.conf.d/60-Device.conf" 1.270 + fi 1.271 +} 1.272 + 1.273 +post_install_virtualbox_ose_guestutils() { 1.274 + if chroot "$1/" lspci | grep -qi virtualbox; then 1.275 + #chroot "$1/" udevadm control --reload 1.276 + grep -qs VBOXSERVICE_OPTIONS "$1/etc/daemons.conf" || 1.277 + cat >> "$1/etc/daemons.conf" <<"EOT" 1.278 +# VBoxService daemon options. 1.279 +VBOXSERVICE_OPTIONS="" 1.280 + 1.281 +EOT 1.282 + KERNEL_VERSION=$( chroot "$1/" uname -r) 1.283 + chroot "$1/" depmod -a $KERNEL_VERSION 1.284 + #chroot "$1/" modprobe -a vboxguest vboxsf vboxvideo 1.285 + sed -i 's/^\tDriver.*$/\tDriver "vboxvideo"/' "$1/etc/X11/xorg.conf.d/60-Device.conf" 1.286 + grep -qs vboxguest "$1/etc/rcS.conf" || 1.287 + sed -i 's/LOAD_MODULES="/&vboxguest vboxsf vboxvideo /' "$1/etc/rcS.conf" 1.288 + grep -qs VBoxService "$1/etc/rcS.conf" || 1.289 + sed -i 's/RUN_DAEMONS="/&VBoxService /' "$1/etc/rcS.conf" 1.290 + grep -qs vboxsf "$1/etc/group" || 1.291 + chroot "$1/" addgroup -g 109 vboxsf 1.292 + echo "add yourself to vboxsf group if you want to access" 1.293 + echo "host shared folder: addgroup $USER vboxsf" 1.294 + #i can't get udev to do its work 1.295 + #echo "then logout and login again" 1.296 + #chroot "$1/" /etc/init.d/VBoxService start &> /dev/null 1.297 + echo "then reboot" 1.298 + else 1.299 + echo "this is not a virtual machine," 1.300 + echo "i'm useless here and you probably" 1.301 + echo "may want to remove me." 1.302 + fi 1.303 +}