wok view virtualbox-ose/receipt @ rev 16592
locale-*: fix gconv modules names
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed May 07 01:56:57 2014 +0300 (2014-05-07) |
parents | 7896f0694ef6 |
children | 4e519df1c7b9 |
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 PROVIDE="virtualbox"
15 DEPENDS="libxml2 xorg-libXcursor libIDL xorg-libXinerama libsdl \
16 xorg-libXmu curl libvncserver libpng jpeg mesa libglu-mesa qt4 vde2"
17 BUILD_DEPENDS="bin86 dev86 iasl libIDL libsdl-dev mesa-dev libxslt-dev \
18 libglu-mesa-dev Qt4-dev libsdl-ttf-dev alsa-lib-dev hal-dev xorg-libXtst-dev \
19 xorg-libXrandr-dev python python-dev xalan-c curl-dev xalan-c-dev \
20 xerces-c-dev openssl-dev zlib-dev libcap-dev glib-dev libvncserver-dev \
21 pam pam-dev bzip2 linux-module-headers pkg-config tar wget vde2-dev \
22 libpng-dev gsoap-dev libdevmapper-dev makeself cdrkit"
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src
28 cp $stuff/LocalConfig.kmk .
29 ./configure \
30 --disable-pulse \
31 --disable-java \
32 --disable-docs \
33 --enable-webservice \
34 --enable-vde \
35 --with-linux=/usr/src/linux
36 source ./env.sh
37 kmk all 2>&1 | grep -v 'kmk: No such'
39 # build modules.
40 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
41 # build guest additions modules
42 KERN_DIR=/usr/src/linux make -C "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src"
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 source $src/env.sh
49 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
50 mkdir -p $fs/usr/bin $fs/usr/lib/virtualbox/components \
51 $fs/usr/share/virtualbox/nls \
52 $fs/usr/lib/virtualbox/ExtensionPacks
53 install -m 0755 VBox.sh $fs/usr/bin/VBox
54 sed -i 's/ps -U/ps | grep/' $fs/usr/bin/VBox
55 ln -sf VBox $fs/usr/bin/VBoxHeadless
56 ln -sf VBox $fs/usr/bin/vboxheadless
57 ln -sf VBox $fs/usr/bin/VBoxManage
58 ln -sf VBox $fs/usr/bin/vboxmanage
59 ln -sf VBox $fs/usr/bin/VBoxSDL
60 ln -sf VBox $fs/usr/bin/vboxsdl
61 ln -sf VBox $fs/usr/bin/VirtualBox
62 ln -sf VBox $fs/usr/bin/virtualbox
63 ln -sf VBox $fs/usr/bin/vboxwebsrv
65 install -m 0755 VBoxTunctl "$fs/usr/bin"
67 # components
68 install -D -m 0755 components/* $fs/usr/lib/virtualbox/components
70 # lib
71 install -m 0755 *.so "$fs/usr/lib/virtualbox"
72 install -m 0644 *.gc *.r0 VBoxEFI*.fd "$fs/usr/lib/virtualbox"
74 #setuid root binaries
75 install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl "$fs/usr/lib/virtualbox"
77 #other binaries
78 #install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL vboxwebsrv webtest "$fs/usr/lib/virtualbox"
79 install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL "$fs/usr/lib/virtualbox"
81 #language
82 install -m 0755 nls/*.qm "$fs/usr/share/virtualbox/nls"
84 #useless scripts
85 install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh "$fs/usr/share/virtualbox"
87 #icon
88 install -D -m 0644 VBox.png "$fs/usr/share/pixmaps/virtualbox.png"
90 #desktop
91 install -D -m 0644 virtualbox.desktop "$fs/usr/share/applications/virtualbox.desktop"
92 sed -i "s|VBox.png|virtualbox|" \
93 $fs/usr/share/applications/virtualbox.desktop
94 install -D -m 0644 virtualbox.xml "$fs/usr/share/mime/packages/virtualbox.xml"
96 #install configuration
97 mkdir -p "$fs/etc/vbox"
98 echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' > "$fs/etc/vbox/vbox.cfg"
99 echo 'INSTALL_DIR=/usr/lib/virtualbox' >> "$fs/etc/vbox/vbox.cfg"
101 #udev
102 install -D -m 0644 "$stuff/10-vboxdrv.rules" \
103 "$fs/etc/udev/rules.d/10-vboxdrv.rules"
105 mkdir -p $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
106 cd sdk/installer
107 VBOX_INSTALL_PATH="/usr/lib/virtualbox" python vboxapisetup.py install --root "$fs"
108 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
109 cd sdk/bindings/xpcom/python
110 cp -r xpcom $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/
111 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/*.py
112 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/*.py
113 chmod 644 $fs/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/*.py
114 cd $src/out/linux.$BUILD_PLATFORM_ARCH/release/bin
116 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g')
117 #cooking installs modules in linux major version dir
118 KBASEVER="${KERNEL_VERSION:0:3}"
120 cd "$src/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
121 install -D -m644 vboxdrv.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxdrv.ko"
122 install -D -m644 vboxnetflt.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetflt.ko"
123 install -D -m644 vboxnetadp.ko "$fs/lib/modules/$KBASEVER-slitaz/misc/vboxnetadp.ko"
124 }
126 pre_remove()
127 {
128 sed -i "s/vboxdrv vboxnetadp vboxnetflt //" $1/etc/rcS.conf
129 chroot $1/ delgroup vboxusers
130 }
132 post_install()
133 {
134 #chroot $1/ udevadm control --reload
135 KERNEL_VERSION=$( chroot $1/ uname -r)
136 chroot $1/ depmod -a $KERNEL_VERSION
137 chroot $1/ modprobe -a vboxdrv vboxnetadp vboxnetflt
138 grep -qs vboxdrv $1/etc/rcS.conf ||
139 sed -i 's/LOAD_MODULES="/&vboxdrv vboxnetadp vboxnetflt /' $1/etc/rcS.conf
140 grep -qs vboxuser $1/etc/group || chroot $1/ addgroup -g 199 vboxusers
141 echo "add yourself to vboxusers group if you want to access"
142 echo "host usb devices: addgroup $USER vboxusers"
143 #i can't get udev to do its work
144 #echo "then logout and login again"
145 echo "then reboot"
146 }