summaryrefslogtreecommitdiffstats
path: root/acompiler/ati-109/Pkgfile
blob: fe098400692af4fc40265aa955f0381ad31c5a78 (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
54
55
56
57
# Description: Pilotes pour les cartes graphiques ATI
# URL: http://www.nvidia.com/object/unix.html
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: xorg-server

name=ati-109
version=10.9
release=1
[ "`uname -m`" == "i686"   ] && _ARCH=x86
[ "`uname -m`" == "x86_64"   ] && _ARCH=x86_64
source=(http://nutyx.meticul.eu/files/ati-driver-installer-10-9-x86.x86_64.run)

build() {
	sh ati-driver-installer-10-9-x86.x86_64.run --extract .
	cd common/lib/modules/fglrx/build_mod
	# Compilation du module
	cp 2.6.x/Makefile .
	cp \
../../../../../arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 .
	make
	# Installation des librairies et utilitaires spécifiques à l'architecture
	mkdir -p $PKG/{etc/X11/xorg.conf.d,lib/modules/`uname -r`/kernel/video/fglrx,usr/{share/ati/lib,bin,sbin,include,lib/{,xorg}}}
	install -m644 fglrx.ko \
	$PKG/lib/modules/`uname -r`/kernel/video/fglrx/fglrx.ko
	cd $SRC/arch/${_ARCH}
	cp -a usr/lib/* $PKG/usr/lib/
	cp -a usr/sbin/* $PKG/usr/sbin/
	cp -a usr/share/ati/lib/* $PKG/usr/share/ati/lib/
	cp -a usr/X11R6/bin/* $PKG/usr/bin/
	cp -a usr/X11R6/lib/* $PKG/usr/lib/
	mv $PKG/usr/lib/modules $PKG//usr/lib/xorg/
	# Installation des librairies et utilitaires communes
	cd $SRC/common
	cp -a usr/* $PKG/usr/
	mv $PKG/usr/X11R6/include/* $PKG/usr/include/
	mv $PKG/usr/X11R6/bin/* $PKG/usr/bin/
	rm -r $PKG/usr/X11R6
	chmod 755 $PKG/usr/bin/*
	# Installation du service
	mkdir -p $PKG/etc/rc.d/rc{0,1,2,3,4,5,6}.d
	mv $PKG/usr/share/doc/fglrx/examples/etc/init.d \
	$PKG/etc/rc.d/
	for i in 3 4 5
		do ln -s ../init.d/atieventsd.sh $PKG/etc/rc.d/rc$i.d/S95atieventsd
	done
	for i in 0 1 2 6
		do ln -s ../init.d/atieventsd.sh $PKG/etc/rc.d/rc$i.d/K10atieventsd
	done
	
cat > $PKG/etc/X11/xorg.conf.d/30-flgrx.conf << "EOF"
Section "Device"
        Identifier      "ATI"
        Driver          "flgrx"
EndSection
EOF
}