updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / qtsixa / PKGBUILD
blob642072b176e10d5330905ab96736e136d72f6f8f
1 # Thanks to falktx for the QtSixa and Sixad utility.
2 pkgname=qtsixa
3 pkgver=1.5.1
4 pkgrel=4
5 pkgdesc="An utility to configure and use sixaxis controller via bluetooth."
6 url="http://sourceforge.net/projects/qtsixa/"
7 arch=('i686' 'x86_64' 'ppc')
8 license=('GPL')
9 backup=('etc/default/sixad')
10 depends=('bluez' 'python2-qt' 'qt' 'python2' 'bluez-hcidump' 'jack')
11 makedepends=('patch')
12 source=(http://downloads.sourceforge.net/qtsixa/QtSixA-"$pkgver"-src.tar.gz
13         sixad-init.patch
14         sixad-bin.patch)
15 md5sums=('d61bef5d737367aeddd57a6bc11da52a'
16          'a8c7585f628ac5b2eafeb735e3eab28b'
17          '0496d5e8c16b4519042bd024ad07b32d')
18 build() {
19         # patch for sixad daemon
20         echo "Patching sixad..."
21         patch -p0 < $srcdir/sixad-init.patch
22         patch -p0 < $srcdir/sixad-bin.patch
24         cd $srcdir/QtSixA-$pkgver/qtsixa/gui/
25         echo "Fixed python version..."
26         find . -name "*.py" -exec sed -i "s/python/python2/g" '{}' \;
27         sed -i 's/python/python2/g' ../qtsixa
28         sed -i 's/python/python2/g' ../../sixad/sixad-dbus-blocker
29         echo "Fixed bluetooth daemon"
30         sed -i 's/init.d/rc.d/g' qtsixa_main.py
31         
32         cd $srcdir/QtSixA-$pkgver
34         make all || exit 1
36 ## Qtsixa installation, adapted from makefile of qtsixa folder ##
37 ## make directories
38 mkdir -p \
39         $pkgdir/usr/bin/ \
40         $pkgdir/usr/share/applications/ \
41         $pkgdir/usr/share/pixmaps/ \
42         $pkgdir/usr/share/qtsixa/ \
43         $pkgdir/usr/share/qtsixa/game-profiles/ \
44         $pkgdir/usr/share/qtsixa/gui/ \
45         $pkgdir/usr/share/qtsixa/icons/ \
46         $pkgdir/usr/share/qtsixa/pics/ \
47         $pkgdir/usr/share/qtsixa/profiles
48 #       $pkgdir/usr/share/doc/qtsixa/manual
49 #       $pkgdir/usr/share/qtsixa/lang/ \
50 #       $pkgdir/usr/share/doc/qtsixa/ \
52 cd qtsixa
54 ## Install files
55         install -m 655 qtsixa $pkgdir/usr/bin/
56         install -m 655 sixad-lq $pkgdir/usr/bin/
57         install -m 655 sixad-notify $pkgdir/usr/bin/
58 #       install -m 644 manual/* $pkgdir/usr/share/doc/qtsixa/manual/
59         install -m 644 game-profiles/* $pkgdir/usr/share/qtsixa/game-profiles/
60         install -m 644 gui/*.py $pkgdir/usr/share/qtsixa/gui/
61         install -m 644 icons/* $pkgdir/usr/share/qtsixa/icons/
62         install -m 644 pics/* $pkgdir/usr/share/qtsixa/pics/
63         install -m 644 profiles/* $pkgdir/usr/share/qtsixa/profiles/
64 #       install -m 644 lang/* $pkgdir/usr/share/qtsixa/lang/
65         install -m 644 sixad-notify.desktop $pkgdir/usr/share/qtsixa/
66         install -m 644 qtsixa.desktop $pkgdir/usr/share/applications/
67         install -m 644 qtsixa.xpm $pkgdir/usr/share/pixmaps/
69 ## Sixad installation, adapted from makefile of sixad folder ##
70 ## Make directories
72 mkdir -p \
73         $pkgdir/etc/default/ \
74         $pkgdir/etc/rc.d/ \
75         $pkgdir/etc/logrotate.d/ \
76         $pkgdir/usr/sbin/ \
77         $pkgdir/var/lib/sixad/ \
78         $pkgdir/var/lib/sixad/profiles/
80 cd ../sixad
82 # Install files
83         install -m 644 sixad.default $pkgdir/etc/default/sixad
84         install -m 755 sixad.init $pkgdir/etc/rc.d/sixad
85         install -m 644 sixad.log $pkgdir/etc/logrotate.d/sixad
86         install -m 755 sixad $pkgdir/usr/bin/
87         install -m 755 bins/sixad-bin $pkgdir/usr/sbin/
88         install -m 755 bins/sixad-sixaxis $pkgdir/usr/sbin/
89         install -m 755 bins/sixad-remote $pkgdir/usr/sbin/
90         install -m 755 bins/sixad-3in1 $pkgdir/usr/sbin/
91         install -m 755 bins/sixad-raw $pkgdir/usr/sbin/
92         install -m 755 sixad-dbus-blocker $pkgdir/usr/sbin/
93         #chmod 777 -R $pkgdir/var/lib/sixad/
95 ## Utils installation, adapted from makefile of utils folder ##
96 ## Install files
98 cd ../utils
99         install -m 755 bins/sixpair $pkgdir/usr/sbin/
100         install -m 755 bins/sixpair-kbd $pkgdir/usr/sbin/
101         install -m 755 bins/hidraw-dump $pkgdir/usr/sbin/
102         install -m 755 bins/sixad-jack $pkgdir/usr/bin/