summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD43
-rw-r--r--g810-led-git.install40
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ac3772187e00
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+# Generated by mksrcinfo v8
+# Mon Jan 23 02:19:58 UTC 2017
+pkgbase = g810-led-git
+ pkgdesc = Linux led controller for the Logitech G810, G410, G610 and G910 Keyboard
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://github.com/MatMoul/g810-led
+ install = g810-led-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = gcc
+ makedepends = make
+ depends = hidapi
+ optdepends = libusb: alternative USB communication library (slower, more stable)
+ provides = g410-led=0.0.1
+ provides = g610-led=0.0.1
+ provides = g810-led=0.0.1
+ provides = g910-led=0.0.1
+ conflicts = g810-led
+ options = !emptydirs
+ backup = etc/g810-led/profile
+ backup = etc/g810-led/reboot
+ source = https://github.com/MatMoul/g810-led/archive/master.zip
+ md5sums = SKIP
+
+pkgname = g810-led-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b94e933b1faf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: MatMoul <matmoul@gmail.com>
+
+pkgname=g810-led-git
+_appname=g810-led
+_gitname=g810-led-master
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="Linux led controller for the Logitech G810, G410, G610 and G910 Keyboard"
+arch=('i686' 'x86_64')
+url="https://github.com/MatMoul/g810-led"
+license=('GPL3')
+depends=('hidapi')
+makedepends=('gcc' 'make')
+optdepends=('libusb: alternative USB communication library (slower, more stable)')
+conflicts=('g810-led')
+install=${pkgname}.install
+provides=("g410-led=${pkgver}" "g610-led=${pkgver}" "g810-led=${pkgver}" "g910-led=${pkgver}")
+backup=("etc/${_appname}/profile" "etc/${_appname}/reboot")
+options=(!emptydirs)
+source=("https://github.com/MatMoul/${_appname}/archive/master.zip")
+md5sums=('SKIP')
+
+build() {
+ cd ${_gitname}
+
+ # build with hidapi :
+ make
+
+ # build with libusb :
+ # make LIB=libusb
+}
+
+package() {
+ cd ${_gitname}
+ make DESTDIR="${pkgdir}" setup
+ cp ${pkgdir}/etc/${_appname}/samples/group_keys ${pkgdir}/etc/${_appname}/profile
+ cp ${pkgdir}/etc/${_appname}/samples/all_off ${pkgdir}/etc/${_appname}/reboot
+ chmod -R 755 ${pkgdir}/etc
+ chmod -R 755 ${pkgdir}/usr
+ chmod -R 644 ${pkgdir}/etc/${_appname}/*
+ chmod 644 ${pkgdir}/etc/udev/rules.d/${_appname}.rules
+ chmod 644 ${pkgdir}/usr/lib/systemd/system/*
+}
diff --git a/g810-led-git.install b/g810-led-git.install
new file mode 100644
index 000000000000..89e319920a21
--- /dev/null
+++ b/g810-led-git.install
@@ -0,0 +1,40 @@
+## arg 1: the new package version
+pre_install() {
+ echo ""
+}
+
+## arg 1: the new package version
+post_install() {
+ udevadm control --reload-rules
+ systemctl daemon-reload
+ systemctl start g810-led
+ systemctl enable g810-led
+ systemctl enable g810-led-reboot
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ echo ""
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ udevadm control --reload-rules
+ systemctl daemon-reload
+ systemctl restart g810-led
+}
+
+## arg 1: the old package version
+pre_remove() {
+ systemctl stop g810-led
+ systemctl disable g810-led
+ systemctl disable g810-led-reboot
+}
+
+## arg 1: the old package version
+post_remove() {
+ systemctl daemon-reload
+ udevadm control --reload-rules
+}