summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Kurth2020-09-02 21:40:21 +0200
committerAndreas Kurth2020-09-02 21:46:33 +0200
commitd937dbc0fe5b60c02319110d006599c545c257dc (patch)
tree9d285350416f81548f987acc63d9978903127679
downloadaur-d937dbc0fe5b60c02319110d006599c545c257dc.tar.gz
Create package of r6.78eef095b3
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore4
-rw-r--r--Makefile-CFLAGS_LDFLAGS.patch22
-rw-r--r--PKGBUILD39
-rw-r--r--strix-claw.service-binary_path.patch13
5 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..638712b567de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = strix-claw
+ pkgdesc = Daemon that prevents freezes of Asus Strix Claw mice
+ pkgver = r6.78eef095b3
+ pkgrel = 1
+ url = https://github.com/hamer/strix-claw
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ depends = libusb>=1.0
+ source = strix-claw-r6.78eef095b3::git+https://github.com/hamer/strix-claw#commit=78eef095b3968124bbf1f58ebd54a7d52403f805
+ source = Makefile-CFLAGS_LDFLAGS.patch
+ source = strix-claw.service-binary_path.patch
+ sha256sums = SKIP
+ sha256sums = 069fce3bf1221e356beb16b7a78f207e8f3f851e5708144a473941ecc725072d
+ sha256sums = e8895bac5b8b92815829c1708c99591e6522917804ec00e335dbd977a3fae727
+
+pkgname = strix-claw
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..3a1973c0b532
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*.pkg.tar.*
+/pkg/
+/src/
+/strix-claw*/
diff --git a/Makefile-CFLAGS_LDFLAGS.patch b/Makefile-CFLAGS_LDFLAGS.patch
new file mode 100644
index 000000000000..dc84ffe6f477
--- /dev/null
+++ b/Makefile-CFLAGS_LDFLAGS.patch
@@ -0,0 +1,22 @@
+diff --git Makefile Makefile
+index df30c4410d..0f3a878ff8 100644
+--- Makefile
++++ Makefile
+@@ -1,7 +1,7 @@
+ PROG=strix-claw
+
+ CC=gcc
+-CFLAGS=-std=gnu99 -W -Wall -Werror -lusb-1.0
++CFLAGS+=-std=gnu99 -W -Wall -Werror -lusb-1.0
+
+ SOURCES := $(wildcard *.c)
+ OBJS := $(patsubst %.c, %.o,$(SOURCES))
+@@ -14,7 +14,7 @@ clean:
+ -rm -f $(PROG) $(OBJS) $(DEPS)
+
+ $(PROG): $(OBJS) $(DEPS)
+- $(CC) $(OBJS) $(CFLAGS) -o $@
++ $(CC) $(OBJS) $(CFLAGS) -o $@ $(LDFLAGS)
+
+ %.dep: %.c Makefile
+ $(CC) $(CFLAGS) -MMD -MP -MF $@ -c $<
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b52e25ed5339
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Andreas Kurth <archlinux@akurth.net>
+pkgname='strix-claw'
+pkgver=r6.78eef095b3
+pkgrel=1
+pkgdesc="Daemon that prevents freezes of Asus Strix Claw mice"
+arch=('x86_64')
+url='https://github.com/hamer/strix-claw'
+license=('GPL3')
+depends=('libusb>=1.0')
+makedepends=('git')
+source=("$pkgname-$pkgver::git+$url#commit=78eef095b3968124bbf1f58ebd54a7d52403f805"
+ 'Makefile-CFLAGS_LDFLAGS.patch'
+ 'strix-claw.service-binary_path.patch')
+sha256sums=('SKIP'
+ '069fce3bf1221e356beb16b7a78f207e8f3f851e5708144a473941ecc725072d'
+ 'e8895bac5b8b92815829c1708c99591e6522917804ec00e335dbd977a3fae727')
+
+pkgver() {
+ cd "$pkgname-$pkgver"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ for patch_file in "$srcdir"/*.patch; do
+ patch --forward -i "$patch_file"
+ done
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -D -t "$pkgdir/usr/lib" strix-claw
+ install -D -m 644 -t "$pkgdir/usr/lib/systemd/system" strix-claw.service
+}
diff --git a/strix-claw.service-binary_path.patch b/strix-claw.service-binary_path.patch
new file mode 100644
index 000000000000..4b15d267e87d
--- /dev/null
+++ b/strix-claw.service-binary_path.patch
@@ -0,0 +1,13 @@
+diff --git strix-claw.service strix-claw.service
+index 9be22b8461..69d4d8608a 100644
+--- strix-claw.service
++++ strix-claw.service
+@@ -3,7 +3,7 @@ Description=Strix Claw hang-prevention daemon
+
+ [Service]
+ User=root
+-ExecStart=/usr/local/bin/strix-claw
++ExecStart=/usr/lib/strix-claw
+ Restart=always
+ RestartSec=5
+