summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSophie Tauchert2020-04-04 17:51:39 +0200
committerSophie Tauchert2020-04-04 17:51:39 +0200
commit79a4afc53dab01d198bd443779c91ab3758f353a (patch)
tree16cb8f929dd155ac46e8e40833caa2b8c75c5720
downloadaur-79a4afc53dab01d198bd443779c91ab3758f353a.tar.gz
Initial commit
-rw-r--r--.SRCINFO31
-rw-r--r--60-gx52.rules3
-rw-r--r--PKGBUILD35
-rw-r--r--gx52.install5
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bc277bf90b0a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = gx52
+ pkgdesc = A GTK application designed to provide control for the LEDs and MFD of Logitech X52 and X52 Pro H.O.T.A.S.
+ pkgver = 0.7.1
+ pkgrel = 1
+ url = https://gitlab.com/leinardi/gx52
+ install = gx52.install
+ arch = any
+ license = GPL3
+ makedepends = meson
+ makedepends = appstream-glib
+ makedepends = libudev0
+ makedepends = libusb
+ depends = gobject-introspection
+ depends = libappindicator-gtk3
+ depends = python
+ depends = python-evdev
+ depends = python-gobject
+ depends = python-injector
+ depends = python-peewee
+ depends = python-pyudev
+ depends = python-pyusb
+ depends = python-requests
+ depends = python-rx
+ depends = python-xdg
+ source = https://gitlab.com/leinardi/gx52/-/archive/0.7.1/gx52-0.7.1.tar.gz
+ source = 60-gx52.rules
+ sha256sums = 462cdea1539d76c82690ed4ba614f2bbc9a4862d13648c857c3658a4551e16a8
+ sha256sums = 8239c7529f939f12455a3db5c000e76df9bb77c84f4ed9092ae731c5a1b3ab90
+
+pkgname = gx52
+
diff --git a/60-gx52.rules b/60-gx52.rules
new file mode 100644
index 000000000000..d309dbbc3faa
--- /dev/null
+++ b/60-gx52.rules
@@ -0,0 +1,3 @@
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="06a3", ATTRS{idProduct}=="0762", MODE="0666"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="06a3", ATTRS{idProduct}=="0255", MODE="0666"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="06a3", ATTRS{idProduct}=="075c", MODE="0666"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..980b2099f6fe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Sophie Tauchert <sophie@999eagle.moe>
+
+pkgname=gx52
+pkgver=0.7.1
+pkgrel=1
+pkgdesc="A GTK application designed to provide control for the LEDs and MFD of Logitech X52 and X52 Pro H.O.T.A.S."
+arch=('any')
+url="https://gitlab.com/leinardi/gx52"
+license=('GPL3')
+depends=('gobject-introspection' 'libappindicator-gtk3' 'python' 'python-evdev' 'python-gobject' 'python-injector' 'python-peewee' 'python-pyudev' 'python-pyusb' 'python-requests' 'python-rx' 'python-xdg')
+makedepends=('meson' 'appstream-glib' 'libudev0' 'libusb')
+provides=()
+conflicts=()
+install="$pkgname.install"
+source=("https://gitlab.com/leinardi/gx52/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
+ '60-gx52.rules')
+sha256sums=('462cdea1539d76c82690ed4ba614f2bbc9a4862d13648c857c3658a4551e16a8'
+ '8239c7529f939f12455a3db5c000e76df9bb77c84f4ed9092ae731c5a1b3ab90')
+
+build() {
+ if [[ -d "$srcdir/build" ]]; then
+ rm -rf "$srcdir/build"
+ fi
+ meson --prefix /usr --buildtype=plain "$pkgname-$pkgver" build
+ ninja -C build
+}
+
+check() {
+ ninja -C build test
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C build install
+ install -Dm644 "$srcdir/60-gx52.rules" "$pkgdir/usr/lib/udev/rules.d/60-gx52.rules"
+}
diff --git a/gx52.install b/gx52.install
new file mode 100644
index 000000000000..9ea9d8f3aba9
--- /dev/null
+++ b/gx52.install
@@ -0,0 +1,5 @@
+post_install() {
+ printf "$(tput setaf 4)To use gx52 as non-root user you need to reload the udev rules$(tput sgr0)\n"
+ printf "$(tput setaf 2)sudo udevadm control --reload-rules$(tput sgr0)\n"
+ printf "$(tput setaf 2)sudo udevadm trigger --subsystem-match=usb --attr-match=idVendor=06a3 --action=add$(tput sgr0)\n"
+}