diff options
Diffstat (limited to 'qtsixa')
-rwxr-xr-x | qtsixa/PKGBUILD | 133 | ||||
-rw-r--r-- | qtsixa/qtsixa-dbus.patch | 24 |
2 files changed, 81 insertions, 76 deletions
diff --git a/qtsixa/PKGBUILD b/qtsixa/PKGBUILD index dc55b15..084f2ca 100755 --- a/qtsixa/PKGBUILD +++ b/qtsixa/PKGBUILD @@ -1,7 +1,7 @@ -# Maintainer: Mattias Andrée <maandree@operamail.com> +# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org> pkgname=qtsixa pkgver=1.5.1 -pkgrel=13 +pkgrel=14 pkgdesc="An utility to configure and use sixaxis controller via bluetooth." url="http://sourceforge.net/projects/qtsixa/" arch=('i686' 'x86_64' 'ppc') @@ -18,22 +18,28 @@ source=(http://downloads.sourceforge.net/qtsixa/QtSixA-"$pkgver"-src.tar.gz qtsixa-dbus.patch qtsixa-gksudo.patch) md5sums=('d61bef5d737367aeddd57a6bc11da52a' - 'a8c7585f628ac5b2eafeb735e3eab28b' - '0496d5e8c16b4519042bd024ad07b32d' - 'f7ed53be82bc4148b9a35cd565eb6ebe' - '7d885a478cdf4dca1c1b724a91bcfdaf' - '55effc1afd592c3805412d430256f855' - '876019839232047a72a11c9fc3fca514') + 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') build() { + # patch files for Arch Linux's filesystem heirarchy + pushd "$srcdir"/QtSixA-"$pkgver" + sed -i 's:/sbin/:/bin/:g' qtsixa/gui/qtsixa_main.py + sed -i 's: /bin/: /usr/bin/:g' qtsixa/gui/qtsixa_main.py + sed -i 's:/sbin/:/bin/:g' utils/Makefile + sed -i 's:/sbin/:/bin/:g' sixad/Makefile + sed -i 's: /sbin/: /usr/bin/:g' sixad/sixad + sed -i 's: /usr/sbin/: /usr/bin/:g' sixad/sixad + sed -i 's:/sbin/:/bin/:g' sixad/bluetooth.cpp + popd + # patch for sixad daemon echo "Patching sixad..." - patch -p0 < $srcdir/sixad-init.patch - patch -p0 < $srcdir/sixad-bin.patch - patch -p0 < $srcdir/sixad-shared-h.patch - patch -p0 < $srcdir/qtsixa-dbus.patch - patch -p0 < $srcdir/qtsixa-gksudo.patch + patch -p0 < "$srcdir"/sixad-init.patch + patch -p0 < "$srcdir"/sixad-bin.patch + patch -p0 < "$srcdir"/sixad-shared-h.patch + patch -p0 < "$srcdir"/qtsixa-dbus.patch + patch -p0 < "$srcdir"/qtsixa-gksudo.patch - cd $srcdir/QtSixA-$pkgver/qtsixa/gui/ + cd "$srcdir"/QtSixA-$pkgver/qtsixa/gui/ echo "Fixed python version..." find . -name "*.py" -exec sed -i "s/python/python2/g" '{}' \; sed -i 's/python/python2/g' ../qtsixa @@ -41,83 +47,82 @@ build() { echo "Fixed bluetooth daemon" sed -i 's/init.d/rc.d/g' qtsixa_main.py - cd $srcdir/QtSixA-$pkgver + cd "$srcdir"/QtSixA-$pkgver make all || exit 1 ## Qtsixa installation, adapted from makefile of qtsixa folder ## ## make directories mkdir -p \ - $pkgdir/usr/bin/ \ - $pkgdir/usr/share/applications/ \ - $pkgdir/usr/share/pixmaps/ \ - $pkgdir/usr/share/qtsixa/ \ - $pkgdir/usr/share/qtsixa/game-profiles/ \ - $pkgdir/usr/share/qtsixa/gui/ \ - $pkgdir/usr/share/qtsixa/icons/ \ - $pkgdir/usr/share/qtsixa/pics/ \ - $pkgdir/usr/share/qtsixa/profiles -# $pkgdir/usr/share/doc/qtsixa/manual -# $pkgdir/usr/share/qtsixa/lang/ \ -# $pkgdir/usr/share/doc/qtsixa/ \ + "$pkgdir"/usr/bin/ \ + "$pkgdir"/usr/share/applications/ \ + "$pkgdir"/usr/share/pixmaps/ \ + "$pkgdir"/usr/share/qtsixa/ \ + "$pkgdir"/usr/share/qtsixa/game-profiles/ \ + "$pkgdir"/usr/share/qtsixa/gui/ \ + "$pkgdir"/usr/share/qtsixa/icons/ \ + "$pkgdir"/usr/share/qtsixa/pics/ \ + "$pkgdir"/usr/share/qtsixa/profiles +# "$pkgdir"/usr/share/doc/qtsixa/manual +# "$pkgdir"/usr/share/qtsixa/lang/ \ +# "$pkgdir"/usr/share/doc/qtsixa/ \ ##systemd -mkdir -p $pkgdir/usr/lib/systemd/system/ -install -m 644 $srcdir/sixad.service $pkgdir/usr/lib/systemd/system/ +mkdir -p "$pkgdir"/usr/lib/systemd/system/ +install -m 644 "$srcdir"/sixad.service "$pkgdir"/usr/lib/systemd/system/ cd qtsixa ## Install files - install -m 755 qtsixa $pkgdir/usr/bin/ - install -m 755 sixad-lq $pkgdir/usr/bin/ - install -m 755 sixad-notify $pkgdir/usr/bin/ -# install -m 644 manual/* $pkgdir/usr/share/doc/qtsixa/manual/ - install -m 644 game-profiles/* $pkgdir/usr/share/qtsixa/game-profiles/ - install -m 644 gui/*.py $pkgdir/usr/share/qtsixa/gui/ - install -m 644 icons/* $pkgdir/usr/share/qtsixa/icons/ - install -m 644 pics/* $pkgdir/usr/share/qtsixa/pics/ - install -m 644 profiles/* $pkgdir/usr/share/qtsixa/profiles/ -# install -m 644 lang/* $pkgdir/usr/share/qtsixa/lang/ - install -m 644 sixad-notify.desktop $pkgdir/usr/share/qtsixa/ - install -m 644 qtsixa.desktop $pkgdir/usr/share/applications/ - install -m 644 qtsixa.xpm $pkgdir/usr/share/pixmaps/ + install -m 755 qtsixa "$pkgdir"/usr/bin/ + install -m 755 sixad-lq "$pkgdir"/usr/bin/ + install -m 755 sixad-notify "$pkgdir"/usr/bin/ +# install -m 644 manual/* "$pkgdir"/usr/share/doc/qtsixa/manual/ + install -m 644 game-profiles/* "$pkgdir"/usr/share/qtsixa/game-profiles/ + install -m 644 gui/*.py "$pkgdir"/usr/share/qtsixa/gui/ + install -m 644 icons/* "$pkgdir"/usr/share/qtsixa/icons/ + install -m 644 pics/* "$pkgdir"/usr/share/qtsixa/pics/ + install -m 644 profiles/* "$pkgdir"/usr/share/qtsixa/profiles/ +# install -m 644 lang/* "$pkgdir"/usr/share/qtsixa/lang/ + install -m 644 sixad-notify.desktop "$pkgdir"/usr/share/qtsixa/ + install -m 644 qtsixa.desktop "$pkgdir"/usr/share/applications/ + install -m 644 qtsixa.xpm "$pkgdir"/usr/share/pixmaps/ ## Sixad installation, adapted from makefile of sixad folder ## ## Make directories mkdir -p \ - $pkgdir/etc/default/ \ - $pkgdir/etc/rc.d/ \ - $pkgdir/etc/logrotate.d/ \ - $pkgdir/usr/sbin/ \ - $pkgdir/var/lib/sixad/ \ - $pkgdir/var/lib/sixad/profiles/ + "$pkgdir"/etc/default/ \ + "$pkgdir"/etc/rc.d/ \ + "$pkgdir"/etc/logrotate.d/ \ + "$pkgdir"/var/lib/sixad/ \ + "$pkgdir"/var/lib/sixad/profiles/ -chmod 775 -R $pkgdir/var/lib/sixad/ +chmod 775 -R "$pkgdir"/var/lib/sixad/ cd ../sixad # Install files - install -m 644 sixad.default $pkgdir/etc/default/sixad - install -m 755 sixad.init $pkgdir/etc/rc.d/sixad - install -m 644 sixad.log $pkgdir/etc/logrotate.d/sixad - install -m 755 sixad $pkgdir/usr/bin/ - install -m 755 bins/sixad-bin $pkgdir/usr/sbin/ - install -m 755 bins/sixad-sixaxis $pkgdir/usr/sbin/ - install -m 755 bins/sixad-remote $pkgdir/usr/sbin/ - install -m 755 bins/sixad-3in1 $pkgdir/usr/sbin/ - install -m 755 bins/sixad-raw $pkgdir/usr/sbin/ - install -m 755 sixad-dbus-blocker $pkgdir/usr/sbin/ - #chmod 777 -R $pkgdir/var/lib/sixad/ + install -m 644 sixad.default "$pkgdir"/etc/default/sixad + install -m 755 sixad.init "$pkgdir"/etc/rc.d/sixad + install -m 644 sixad.log "$pkgdir"/etc/logrotate.d/sixad + install -m 755 sixad "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-bin "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-sixaxis "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-remote "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-3in1 "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-raw "$pkgdir"/usr/bin/ + install -m 755 sixad-dbus-blocker "$pkgdir"/usr/bin/ + #chmod 777 -R "$pkgdir"/var/lib/sixad/ ## Utils installation, adapted from makefile of utils folder ## ## Install files cd ../utils - install -m 755 bins/sixpair $pkgdir/usr/sbin/ - install -m 755 bins/sixpair-kbd $pkgdir/usr/sbin/ - install -m 755 bins/hidraw-dump $pkgdir/usr/sbin/ - install -m 755 bins/sixad-jack $pkgdir/usr/bin/ + install -m 755 bins/sixpair "$pkgdir"/usr/bin/ + install -m 755 bins/sixpair-kbd "$pkgdir"/usr/bin/ + install -m 755 bins/hidraw-dump "$pkgdir"/usr/bin/ + install -m 755 bins/sixad-jack "$pkgdir"/usr/bin/ } diff --git a/qtsixa/qtsixa-dbus.patch b/qtsixa/qtsixa-dbus.patch index 85376ea..294cd47 100644 --- a/qtsixa/qtsixa-dbus.patch +++ b/qtsixa/qtsixa-dbus.patch @@ -1,4 +1,4 @@ -diff -urp QtSixA-1.5.1.orig/qtsixa/gui/qtsixa_main.py QtSixA-1.5.1/qtsixa/gui/qtsixa_main.py + diff -urp QtSixA-1.5.1.orig/qtsixa/gui/qtsixa_main.py QtSixA-1.5.1/qtsixa/gui/qtsixa_main.py --- QtSixA-1.5.1.orig/qtsixa/gui/qtsixa_main.py 2012-12-06 22:59:03.103868725 -0800 +++ QtSixA-1.5.1/qtsixa/gui/qtsixa_main.py 2012-12-06 22:59:55.033596582 -0800 @@ -307,6 +307,8 @@ class MainW(QMainWindow, ui_qtsixa_mainw @@ -28,23 +28,23 @@ diff -urp QtSixA-1.5.1.orig/sixad/Makefile QtSixA-1.5.1/sixad/Makefile --- QtSixA-1.5.1.orig/sixad/Makefile 2012-12-06 22:59:03.100535408 -0800 +++ QtSixA-1.5.1/sixad/Makefile 2012-12-06 22:59:17.417127047 -0800 @@ -34,7 +34,6 @@ install: - install -m 755 bins/sixad-remote $(DESTDIR)/usr/sbin/ - install -m 755 bins/sixad-3in1 $(DESTDIR)/usr/sbin/ - install -m 755 bins/sixad-raw $(DESTDIR)/usr/sbin/ -- install -m 755 sixad-dbus-blocker $(DESTDIR)/usr/sbin/ + install -m 755 bins/sixad-remote $(DESTDIR)/usr/bin/ + install -m 755 bins/sixad-3in1 $(DESTDIR)/usr/bin/ + install -m 755 bins/sixad-raw $(DESTDIR)/usr/bin/ +- install -m 755 sixad-dbus-blocker $(DESTDIR)/usr/bin/ @chmod 777 -R $(DESTDIR)/var/lib/sixad/ @echo "Installation is Complete!" @@ -47,5 +46,4 @@ uninstall: - rm -f $(DESTDIR)/usr/sbin/sixad-sixaxis - rm -f $(DESTDIR)/usr/sbin/sixad-remote - rm -f $(DESTDIR)/usr/sbin/sixad-raw -- rm -f $(DESTDIR)/usr/sbin/sixad-dbus-blocker + rm -f $(DESTDIR)/usr/bin/sixad-sixaxis + rm -f $(DESTDIR)/usr/bin/sixad-remote + rm -f $(DESTDIR)/usr/bin/sixad-raw +- rm -f $(DESTDIR)/usr/bin/sixad-dbus-blocker rm -rf $(DESTDIR)/var/lib/sixad/ diff -urp QtSixA-1.5.1.orig/sixad/sixad QtSixA-1.5.1/sixad/sixad --- QtSixA-1.5.1.orig/sixad/sixad 2012-12-06 22:59:03.100535408 -0800 +++ QtSixA-1.5.1/sixad/sixad 2012-12-06 22:59:17.417127047 -0800 -@@ -48,9 +48,6 @@ $SUDO /sbin/modprobe uinput +@@ -48,9 +48,6 @@ $SUDO /usr/bin/modprobe uinput } bt_start () { @@ -52,14 +52,14 @@ diff -urp QtSixA-1.5.1.orig/sixad/sixad QtSixA-1.5.1/sixad/sixad -env sleep 1 - if [ -f /lib/udev/rules.d/97-bluetooth.rules ]; then - $SUDO /usr/sbin/bluetoothd --udev + $SUDO /usr/bin/bluetoothd --udev elif [ -f /etc/rc.d/bluetooth ]; then @@ -64,8 +61,6 @@ bt_stop() { if (bluetoothd_running_check); then $SUDO pkill -KILL bluetoothd fi - --$SUDO /usr/sbin/sixad-dbus-blocker & +-$SUDO /usr/bin/sixad-dbus-blocker & } case $1 in |