summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD37
-rw-r--r--rusty-keys.target7
-rw-r--r--rusty-keys@.service9
4 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7614043d458
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = rusty-keys
+ pkgdesc = uinput level keyboard mapper for linux
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://code.moparisthebest.com/moparisthebest/rusty-keys
+ arch = i686
+ arch = x86_64
+ license = AGPL
+ makedepends = cargo
+ makedepends = systemd
+ depends = libsystemd
+ source = rusty-keys-0.0.1.tar.gz::https://crates.io/api/v1/crates/rusty-keys/0.0.1/download
+ source = rusty-keys-0.0.1.tar.gz.asc::https://code.moparisthebest.com/attachments/97f6888b-df43-4e7c-a3f5-d4982b24341b
+ source = rusty-keys@.service
+ source = rusty-keys.target
+ validpgpkeys = 81F1C22DD41109D4A9C0A7B5B070F8D97D1A0BBA
+ sha256sums = f26dd1a1b2005b82929e6bc64966f545834a1f77c1ed9221f7de42a3d6c84239
+ sha256sums = SKIP
+ sha256sums = 4b8df8362d87c2aa31c028cf7aeaae109678f044f19be7ad2e492056e9d96b03
+ sha256sums = 70afa48c38901dd7de377f8ab4432806adeb944bd171df02091da617ed138862
+
+pkgname = rusty-keys
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1d3f77a4b6b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: moparisthebest <admin dot archlinux AT moparisthebest dot com>
+
+pkgname=rusty-keys
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="uinput level keyboard mapper for linux"
+url="https://code.moparisthebest.com/moparisthebest/rusty-keys"
+makedepends=('cargo' 'systemd')
+depends=('libsystemd')
+arch=('i686' 'x86_64')
+license=('AGPL')
+source=("$pkgname-$pkgver.tar.gz::https://crates.io/api/v1/crates/$pkgname/$pkgver/download"
+ "$pkgname-$pkgver.tar.gz.asc::https://code.moparisthebest.com/attachments/97f6888b-df43-4e7c-a3f5-d4982b24341b"
+ 'rusty-keys@.service'
+ rusty-keys.target
+ )
+validpgpkeys=('81F1C22DD41109D4A9C0A7B5B070F8D97D1A0BBA') # moparisthebest <admin AT moparisthebest.com>
+sha256sums=('f26dd1a1b2005b82929e6bc64966f545834a1f77c1ed9221f7de42a3d6c84239'
+ 'SKIP'
+ '4b8df8362d87c2aa31c028cf7aeaae109678f044f19be7ad2e492056e9d96b03'
+ '70afa48c38901dd7de377f8ab4432806adeb944bd171df02091da617ed138862'
+ )
+
+build() {
+ cd "$pkgname-$pkgver"
+ cargo build --release
+}
+
+package() {
+ install -Dm644 'rusty-keys@.service' "${pkgdir}/usr/lib/systemd/system/rusty-keys@.service"
+ install -Dm644 rusty-keys.target "${pkgdir}/usr/lib/systemd/system/rusty-keys.target"
+
+ cd "$pkgname-$pkgver"
+ install -Dm755 target/release/rusty-keys "$pkgdir/usr/bin/rusty-keys"
+ install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+ install -Dm644 keymap.toml "${pkgdir}/etc/rusty-keys/keymap.toml"
+}
diff --git a/rusty-keys.target b/rusty-keys.target
new file mode 100644
index 00000000000..900e735c763
--- /dev/null
+++ b/rusty-keys.target
@@ -0,0 +1,7 @@
+[Unit]
+Description=rusty-keys keymapper service
+After=systemd-udevd.service
+
+[Install]
+WantedBy=default.target
+
diff --git a/rusty-keys@.service b/rusty-keys@.service
new file mode 100644
index 00000000000..e245081448e
--- /dev/null
+++ b/rusty-keys@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=rusty-keys keymapper service
+After=systemd-udevd.service
+
+[Service]
+ExecStart=/usr/bin/rusty-keys -c /etc/rusty-keys/keymap.toml -d /dev/input/%I
+
+[Install]
+WantedBy=rusty-keys.target