aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/keyd/APKBUILD36
-rw-r--r--testing/keyd/keyd.initd14
-rw-r--r--testing/keyd/obey-build-flags.patch20
-rw-r--r--testing/keyd/ungit.patch32
4 files changed, 102 insertions, 0 deletions
diff --git a/testing/keyd/APKBUILD b/testing/keyd/APKBUILD
new file mode 100644
index 0000000000..c228dea71d
--- /dev/null
+++ b/testing/keyd/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=keyd
+pkgver=1.1.2
+pkgrel=0
+pkgdesc="A key remapping daemon for Linux"
+url="https://github.com/rvaiya/keyd"
+arch="all"
+license="MIT"
+makedepends="eudev-dev"
+subpackages="$pkgname-doc $pkgname-openrc"
+source="https://github.com/rvaiya/keyd/archive/v$pkgver/keyd-$pkgver.tar.gz
+ ungit.patch
+ obey-build-flags.patch
+ $pkgname.initd
+ "
+options="!check" # no tests provided
+
+build() {
+ make
+}
+
+package() {
+ make install DESTDIR="$pkgdir"
+ rm -rf "$pkgdir"/usr/lib/systemd
+
+ install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ echo uinput | install -D -m644 /dev/stdin "$pkgdir"/usr/lib/modules-load.d/$pkgname.conf
+}
+
+sha512sums="
+c8a3287e6f6b3b778b8db63fd1c0005ed2e93706f659c8e9c5029791e1b226eea9e73e72602607a21a5121b74776f7dc941327ea00d6f38e7201349c8221052c keyd-1.1.2.tar.gz
+de80226c88e782fd39ea930dc6ac218584c62f3847251c3c506df3c461261ec87e2cfffdcb50a8e854d66ea333a3a1ae7f7c837b048d61798cfc07b65b01ef19 ungit.patch
+c77df804ee5f665cd7f19efd6abe2364161c6715271d31a55bb1d1155fb5dc58ca824e8d8800a2cf650946c3a7cd751a2c22353238f481442d6319426dcbe4fe obey-build-flags.patch
+9e909d7d5468e717d8ca3c165bb3846f17f03bb7d1f19c424d7cc0e5ac282f1bad156c34c12b019a00100574e53b21d4245c028e13c662cad7048b3a956ede2c keyd.initd
+"
diff --git a/testing/keyd/keyd.initd b/testing/keyd/keyd.initd
new file mode 100644
index 0000000000..5f6ab350b8
--- /dev/null
+++ b/testing/keyd/keyd.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+
+name="keyd"
+description="A key remapping deamon"
+
+: ${error_logger="logger -t $name -p daemon.warning"}
+
+command="/usr/bin/keyd"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
+
+depend() {
+ need localmount dev-mount
+}
diff --git a/testing/keyd/obey-build-flags.patch b/testing/keyd/obey-build-flags.patch
new file mode 100644
index 0000000000..96d092e708
--- /dev/null
+++ b/testing/keyd/obey-build-flags.patch
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,14 +4,14 @@
+ PREFIX=/usr
+
+ VERSION=1.1.2
+-CFLAGS=-DVERSION=\"$(VERSION)\"
++CFLAGS+=-DVERSION=\"$(VERSION)\"
+
+ all:
+ mkdir -p bin
+- $(CC) $(CFLAGS) -O3 src/*.c -o bin/keyd -ludev
++ $(CC) $(CFLAGS) $(LDFLAGS) src/*.c -o bin/keyd -ludev
+ debug:
+ mkdir -p bin
+- $(CC) $(CFLAGS) -Wall -Wextra -pedantic -DDEBUG -g src/*.c -o bin/keyd -ludev
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -Wextra -pedantic -DDEBUG -g src/*.c -o bin/keyd -ludev
+ man:
+ pandoc -s -t man man.md | gzip > keyd.1.gz
+ clean:
diff --git a/testing/keyd/ungit.patch b/testing/keyd/ungit.patch
new file mode 100644
index 0000000000..4566796dd3
--- /dev/null
+++ b/testing/keyd/ungit.patch
@@ -0,0 +1,32 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,8 +4,7 @@
+ PREFIX=/usr
+
+ VERSION=1.1.2
+-GIT_HASH=$(shell git describe --no-match --always --abbrev=40 --dirty)
+-CFLAGS=-DVERSION=\"$(VERSION)\" -DGIT_COMMIT_HASH=\"$(GIT_HASH)\"
++CFLAGS=-DVERSION=\"$(VERSION)\"
+
+ all:
+ mkdir -p bin
+--- a/src/main.c
++++ b/src/main.c
+@@ -890,7 +890,7 @@
+ {
+ if(argc > 1) {
+ if(!strcmp(argv[1], "-v")) {
+- fprintf(stderr, "keyd version: %s (%s)\n", VERSION, GIT_COMMIT_HASH);
++ fprintf(stderr, "keyd version: %s\n", VERSION);
+ return 0;
+ } else if(!strcmp(argv[1], "-m")) {
+ return monitor_loop();
+@@ -918,7 +918,7 @@
+ if(argc > 1 && !strcmp(argv[1], "-d"))
+ daemonize();
+
+- warn("Starting keyd v%s (%s).", VERSION, GIT_COMMIT_HASH);
++ warn("Starting keyd v%s.", VERSION);
+ config_generate();
+ ufd = create_uinput_fd();
+