summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriano Moura2015-06-12 21:20:41 -0300
committerAdriano Moura2015-06-12 21:20:41 -0300
commita8f64d14039d1bce5938927fcdd67579a95e84b4 (patch)
treec50973f22965e7f75f53e7dbebee3793e5e6ccba
downloadaur-a8f64d14039d1bce5938927fcdd67579a95e84b4.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD43
-rw-r--r--fix_asset_path.patch11
-rw-r--r--jstest-gtk.desktop10
4 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..13d3c7485dbe
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = jstest-gtk-git
+ pkgdesc = A simple GTK2-based joystick tester and calibrator
+ pkgver = 0.1.0.r44.gddc6bce
+ pkgrel = 1
+ url = https://github.com/Grumbel/jstest-gtk/
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = scons
+ depends = gtkmm
+ source = git://github.com/Grumbel/jstest-gtk/
+ source = jstest-gtk.desktop
+ source = fix_asset_path.patch
+ sha1sums = SKIP
+ sha1sums = 4a8a3f5ac41b509fdfc0aec7cf017447e58ec973
+ sha1sums = 69df12f70712e68f5d2f75d24a5d2bff0a1e0a5e
+
+pkgname = jstest-gtk-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..40eb926d98ed
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Submiter: ZekeSulastin <zekesulastin@gmail.com>
+# Maintainer: AdrianoML <adriano.lols@gmail.com>
+
+pkgname=jstest-gtk-git
+pkgver=0.1.0.r44.gddc6bce
+pkgrel=1
+pkgdesc="A simple GTK2-based joystick tester and calibrator"
+arch=('i686' 'x86_64')
+url="https://github.com/Grumbel/jstest-gtk/"
+source=('git://github.com/Grumbel/jstest-gtk/' 'jstest-gtk.desktop' 'fix_asset_path.patch')
+license=('GPL3')
+depends=('gtkmm')
+makedepends=('git' 'scons')
+_gitname="jstest-gtk"
+
+sha1sums=('SKIP'
+ '4a8a3f5ac41b509fdfc0aec7cf017447e58ec973'
+ '69df12f70712e68f5d2f75d24a5d2bff0a1e0a5e')
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+ git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+
+ msg "Patching..."
+ patch -p2 < "$srcdir/fix_asset_path.patch"
+
+ scons
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+
+ install -D -m755 jstest-gtk "$pkgdir/usr/bin/jstest-gtk"
+ install -D -m644 "./data/generic.png" "${pkgdir}/usr/share/icons/jstest-gtk.png"
+ install -D -m644 "${srcdir}/jstest-gtk.desktop" "${pkgdir}/usr/share/applications/jstest-gtk.desktop"
+ mkdir -p "${pkgdir}/usr/share/jstest-gtk"
+ cp -r "${srcdir}/jstest-gtk/data" "${pkgdir}/usr/share/jstest-gtk/"
+}
+
diff --git a/fix_asset_path.patch b/fix_asset_path.patch
new file mode 100644
index 000000000000..fe932dc4317e
--- /dev/null
+++ b/fix_asset_path.patch
@@ -0,0 +1,11 @@
+--- src/jstest-gtk/src/joystick_list_widget.cpp 2015-03-29 21:14:20.241884909 -0600
++++ src/jstest-gtk/src/joystick_list_widget.cpp 2015-03-29 21:21:27.835219758 -0600
+@@ -123,7 +123,7 @@
+ for(std::vector<JoystickDescription>::const_iterator i = joysticks.begin(); i != joysticks.end(); ++i)
+ {
+ Gtk::ListStore::iterator it = device_list->append();
+- (*it)[DeviceListColumns::instance().icon] = Gdk::Pixbuf::create_from_file(Main::current()->get_data_directory() + "generic.png");
++ (*it)[DeviceListColumns::instance().icon] = Gdk::Pixbuf::create_from_file("/usr/share/jstest-gtk/data/generic.png");
+ (*it)[DeviceListColumns::instance().path] = i->filename;
+
+ std::ostringstream out;
diff --git a/jstest-gtk.desktop b/jstest-gtk.desktop
new file mode 100644
index 000000000000..d4b0f343f95c
--- /dev/null
+++ b/jstest-gtk.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=0.1.0
+Type=Application
+Name=jstest-gtk
+Categories=Game;Utility;GTK;
+GenericName=Joystick Configuration
+Comment=Configuration utility for joysticks
+Exec=/usr/bin/jstest-gtk
+Icon=/usr/share/icons/jstest-gtk.png
+StartupNotify=false