wok view virtualbox-ose/receipt @ rev 20896
updated ethtool (4.2 -> 4.19)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Feb 26 14:11:25 2019 +0100 (2019-02-26) |
parents | a5dd38784e31 |
children | cc07895be981 |
line source
1 # SliTaz package receipt.
3 PACKAGE="virtualbox-ose"
4 VERSION="4.2.6"
5 CATEGORY="misc"
6 SHORT_DESC="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="GPL2"
9 SOURCE="VirtualBox"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="https://www.virtualbox.org/"
12 WGET_URL="http://download.virtualbox.org/virtualbox/$VERSION/$TARBALL"
13 TAGS="virtualization"
14 PROVIDE="virtualbox"
16 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \
17 xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa vde2 \
18 python libQtCore libQtGui libQtNetwork libQtOpenGL"
19 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \
20 libglu-mesa-dev Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \
21 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \
22 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \
23 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev \
24 libpng-dev gsoap-dev libdevmapper-dev makeself cdrkit flex"
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 grep -rl 'uname -m' $src | xargs sed -i 's|\(.\)uname -m|\1echo i486|'
30 patch -p1 < $stuff/virtualbox-linux.patch
31 cp $stuff/LocalConfig.kmk .
32 ./configure \
33 --disable-pulse \
34 --disable-java \
35 --disable-docs \
36 --enable-webservice \
37 --enable-vde \
38 --with-linux=/usr/src/linux
39 source ./env.sh
40 kmk all 2>&1 | grep -v 'kmk: No such'
42 # build modules.
43 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
44 # build guest additions modules
45 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 source $src/env.sh
52 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
53 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
54 $fs/usr/share/virtualbox/nls \
55 $fs/usr/lib/virtualbox/ExtensionPacks
56 install -m 0755 VBox.sh $fs/usr/bin/VBox
57 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
58 ln -sf VBox $fs/usr/bin/VBoxHeadless
59 ln -sf VBox $fs/usr/bin/vboxheadless
60 ln -sf VBox $fs/usr/bin/VBoxManage
61 ln -sf VBox $fs/usr/bin/vboxmanage
62 ln -sf VBox $fs/usr/bin/VBoxSDL
63 ln -sf VBox $fs/usr/bin/vboxsdl
64 ln -sf VBox $fs/usr/bin/VirtualBox
65 ln -sf VBox $fs/usr/bin/virtualbox
66 ln -sf VBox $fs/usr/bin/vboxwebsrv
68 install -m 0755 VBoxTunctl "$fs/usr/bin"
70 # components
71 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
73 # lib
74 install -m 0755 *.so "$fs/usr/lib/virtualbox"
75 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
77 #setuid root binaries
78 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
80 #other binaries
81 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
82 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
84 #language
85 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
87 #useless scripts
88 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
90 #icon
91 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png"
93 #desktop
94 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
95 sed -i "s|VBox.png|virtualbox|" \
96 $fs/usr/share/applications/virtualbox.desktop
98 #install configuration
99 mkdir -p "$fs/etc/vbox"
100 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
101 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
103 #udev
104 install -D -m 0644 "$stuff/10-vboxdrv.rules" \
105 "$fs/etc/udev/rules.d/10-vboxdrv.rules"
107 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
108 cd sdk/installer
109 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
110 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
111 cd sdk/bindings/xpcom/python
112 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
113 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
114 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
115 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
116 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
118 # virtualbox-ose-modules
119 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g')
121 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
122 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxdrv.ko"
123 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetflt.ko"
124 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KERNEL_VERSION-slitaz/misc/vboxnetadp.ko"
125 }
127 pre_remove()
128 {
129 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" "$1/etc/rcS.conf"
130 chroot "$1/" delgroup vboxusers
131 }
133 post_install()
134 {
135 #chroot "$1/" udevadm control --reload
136 KERNEL_VERSION=$( chroot "$1/" uname -r)
137 chroot "$1/" depmod -a $KERNEL_VERSION
138 chroot "$1/" modprobe -a vboxdrv vboxnetadp vboxnetflt
139 grep -qs vboxdrv "$1/etc/rcS.conf" ||
140 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' "$1/etc/rcS.conf"
141 grep -qs vboxuser "$1/etc/group" || chroot "$1/" addgroup -g 199 vboxusers
142 echo "add yourself to vboxusers group if you want to access"
143 echo "host usb devices: addgroup $USER vboxusers"
144 #i can't get udev to do its work
145 #echo "then logout and login again"
146 echo "then reboot"
147 }