wok-current view virtualbox-ose/receipt @ rev 24966
updated nettle and nettle-dev (3.5.1 -> 3.7.3)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Apr 25 07:28:45 2022 +0100 (2022-04-25) |
parents | cc07895be981 |
children |
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 virtualbox-ose-modules"
20 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \
21 libglu-mesa-dev Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \
22 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \
23 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \
24 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev \
25 libpng-dev gsoap-dev libdevmapper-dev makeself cdrkit flex"
27 current_version()
28 {
29 wget -O - http://download.virtualbox.org/virtualbox 2>/dev/null | \
30 sed '/href=.[0-9]/!d;s|.*href=.||;s|/.*||' | sort -Vr | sed q
31 }
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 grep -rl 'uname -m' $src | xargs sed -i 's|\(.\)uname -m|\1echo i486|'
37 patch -p1 < $stuff/virtualbox-linux.patch
38 cp $stuff/vbox-cpuhotplug.dsl src/VBox/Devices/PC/
39 sed -i '/Wake up on LAN/{NNNNNd};s|S2BF, 1|&, Serialized|' \
40 src/VBox/Devices/PC/vbox.dsl
41 sed -i '/soapvbox\*\.h/d' src/VBox/Main/webservice/Makefile.kmk
42 cp $stuff/LocalConfig.kmk .
43 ./configure \
44 --disable-pulse \
45 --disable-java \
46 --disable-docs \
47 --enable-webservice \
48 --enable-vde \
49 --with-linux=/usr/src/linux
50 source ./env.sh
51 kmk all 2>&1 | grep -v 'kmk: No such'
53 # Prepare modules tree.
54 mkdir -p $src/out/linux.amd64/release/bin
55 cp -a $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src \
56 $src/out/linux.amd64/release/bin/src
57 # build guest additions modules
58 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 source $src/env.sh
65 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
66 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
67 $fs/usr/share/virtualbox/nls \
68 $fs/usr/lib/virtualbox/ExtensionPacks
69 install -m 0755 VBox.sh $fs/usr/bin/VBox
70 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
71 ln -sf VBox $fs/usr/bin/VBoxHeadless
72 ln -sf VBox $fs/usr/bin/vboxheadless
73 ln -sf VBox $fs/usr/bin/VBoxManage
74 ln -sf VBox $fs/usr/bin/vboxmanage
75 ln -sf VBox $fs/usr/bin/VBoxSDL
76 ln -sf VBox $fs/usr/bin/vboxsdl
77 ln -sf VBox $fs/usr/bin/VirtualBox
78 ln -sf VBox $fs/usr/bin/virtualbox
79 ln -sf VBox $fs/usr/bin/vboxwebsrv
81 install -m 0755 VBoxTunctl "$fs/usr/bin"
83 # components
84 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
86 # lib
87 install -m 0755 *.so "$fs/usr/lib/virtualbox"
88 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
90 #setuid root binaries
91 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
93 #other binaries
94 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
95 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
97 #language
98 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
100 #useless scripts
101 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
103 #icon
104 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png"
106 #desktop
107 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
108 sed -i "s|VBox.png|virtualbox|" \
109 $fs/usr/share/applications/virtualbox.desktop
111 #install configuration
112 mkdir -p "$fs/etc/vbox"
113 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
114 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
116 #udev
117 install -D -m 0644 "$stuff/10-vboxdrv.rules" \
118 "$fs/etc/udev/rules.d/10-vboxdrv.rules"
120 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
121 cd sdk/installer
122 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
123 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
124 cd sdk/bindings/xpcom/python
125 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
126 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
127 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
128 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
129 }
131 pre_remove()
132 {
133 chroot "$1/" delgroup vboxusers
134 }
136 post_install()
137 {
138 #chroot "$1/" udevadm control --reload
139 grep -qs vboxuser "$1/etc/group" || chroot "$1/" addgroup -g 199 vboxusers
140 echo "add yourself to vboxusers group if you want to access"
141 echo "host usb devices: addgroup $USER vboxusers"
142 #i can't get udev to do its work
143 #echo "then logout and login again"
144 echo "then reboot"
145 }