From 1c0ffad28b61aba3fc262b8291d12db726aff2cb Mon Sep 17 00:00:00 2001 From: kth5 Date: Sat, 27 Jan 2024 16:27:26 +0100 Subject: [PATCH] * add ydotool --- ydotool/80-uinput.rules | 3 +++ ydotool/PKGBUILD | 33 +++++++++++++++++++++++++++++++++ ydotool/ydotool.install | 8 ++++++++ 3 files changed, 44 insertions(+) create mode 100644 ydotool/80-uinput.rules create mode 100644 ydotool/PKGBUILD create mode 100644 ydotool/ydotool.install diff --git a/ydotool/80-uinput.rules b/ydotool/80-uinput.rules new file mode 100644 index 0000000000..9287e38507 --- /dev/null +++ b/ydotool/80-uinput.rules @@ -0,0 +1,3 @@ +## ydotoold fix +## https://github.com/ReimuNotMoe/ydotool/issues/25#issuecomment-535842993 +KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput" diff --git a/ydotool/PKGBUILD b/ydotool/PKGBUILD new file mode 100644 index 0000000000..09b4e01458 --- /dev/null +++ b/ydotool/PKGBUILD @@ -0,0 +1,33 @@ +# POWER Maintainer: Alexander Baldeck +# Maintainer: Felix Yan +# Contributor: Eric Engestrom + +pkgname=ydotool +pkgver=1.0.4 +pkgrel=1 +pkgdesc="Generic command-line automation tool (no X!)" +arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) +depends=('glibc') +makedepends=('cmake' 'ninja' 'scdoc' 'systemd') +url="https://github.com/ReimuNotMoe/ydotool" +license=('AGPL3') +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" + "80-uinput.rules") +sha256sums=('ba075a43aa6ead51940e892ecffa4d0b8b40c241e4e2bc4bd9bd26b61fde23bd' + 'e092f5e7e474aec6c980c458046d0ff11b18750b53de2bf0a0aba1ca26e6d58e') +install=ydotool.install + +build() { + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_MANDIR=/usr/share/man \ + -G Ninja \ + -S "$pkgname-$pkgver" -B build + ninja -C build +} + +package() { + DESTDIR="$pkgdir" ninja -C build install + + install -Dm644 80-uinput.rules -t "$pkgdir"/usr/lib/udev/rules.d/ +} diff --git a/ydotool/ydotool.install b/ydotool/ydotool.install new file mode 100644 index 0000000000..065f9b4e1e --- /dev/null +++ b/ydotool/ydotool.install @@ -0,0 +1,8 @@ +post_install() { + echo 'Make sure your user is in the `input` group by running the following command:' + echo ' $ usermod -aG input $USER' +} + +post_upgrade() { + post_install +}