summaryrefslogtreecommitdiffstats
path: root/virtualbox-bin/Pkgfile
blob: e8807793dc86a21352f31ad95349d9331cd1657c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Description: logiciel pour lancer un système virtualisé binaire
# URL: http://www.virtualbox.org
# Maintainer: NutyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: sdl
# Run on: sdl

name=virtualbox-bin
version=4.1.14
release=1
_release=77440
_releaseExt=77440
_name=Oracle_VM_VirtualBox_Extension_Pack

PKGMK_IGNORE_FOOTPRINT="yes"
PKGMK_IGNORE_MD5SUM="yes"


[ "`uname -m`" == "i686"   ] && _ARCH=x86
[ "`uname -m`" == "x86_64"   ] && _ARCH=amd64

source=(http://download.virtualbox.org/virtualbox/$version/VirtualBox-${version}-${_release}-Linux_${_ARCH}.run
	http://download.virtualbox.org/virtualbox/$version/${_name}-${version}-${_releaseExt}.vbox-extpack)

build() {
	sh VirtualBox-${version}-${_release}-Linux_${_ARCH}.run --keep --noexec --target $SRC/
	mkdir -p $PKG/opt/VirtualBox $PKG/etc/vbox $PKG/usr/bin $PKG/etc/udev/rules.d/ \
	$PKG/usr/share/applications/ $PKG/usr/share/pixmaps/
	cd $PKG/opt/VirtualBox
	tar xfj $SRC/VirtualBox.tar.bz2
	rm -Rf $PKG/opt/VirtualBox/sdk
	for i in VirtualBox VBoxManage VBoxSDL VBoxHeadless 
		do ln -s /opt/VirtualBox/VBox.sh $PKG/usr/bin/$i
	done
	cd components
	for i in VBoxDDU.so VBoxREM.so VBoxRT.so VBoxVMM.so VBoxXPCOM.so
		do ln -s ../$i .
	done
	ln -s /opt/VirtualBox/rdesktop-vrdp $PKG/usr/bin/rdesktop-vrdp
	mv $PKG/opt/VirtualBox/VBox.png $PKG/usr/share/pixmaps/VBox.png
	mv $PKG/opt/VirtualBox/virtualbox.desktop $PKG/usr/share/applications/virtualbox.desktop
	chmod +s $PKG/opt/VirtualBox/{VirtualBox,VBoxSDL,VBoxHeadless}
	echo "KERNEL==\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"vboxusers\", MODE=\"0660\"" > \
	$PKG/etc/udev/rules.d/60-vboxdrv.rules
	echo "# VirtualBox installation directory" > \
	$PKG/etc/vbox/vbox.cfg
	echo "INSTALL_DIR="\"/opt/VirtualBox\" >> \
		$PKG/etc/vbox/vbox.cfg

	install -D -m 644 $SRC/${_name}-$version-${_releaseExt}.vbox-extpack \
		$PKG/usr/share/virtualbox/extensions/${_name}-$version-${_releaseExt}.vbox-extpack
}