From ed3986e467b1817af27e26080bcc48284badb383 Mon Sep 17 00:00:00 2001 From: madonuko Date: Mon, 21 Oct 2024 16:00:02 +0800 Subject: [PATCH] add: joycond --- anda/games/joycond/anda.hcl | 5 ++++ anda/games/joycond/joycond.spec | 45 +++++++++++++++++++++++++++++++++ anda/games/joycond/update.rhai | 1 + 3 files changed, 51 insertions(+) create mode 100644 anda/games/joycond/anda.hcl create mode 100644 anda/games/joycond/joycond.spec create mode 100644 anda/games/joycond/update.rhai diff --git a/anda/games/joycond/anda.hcl b/anda/games/joycond/anda.hcl new file mode 100644 index 0000000000..e48a88db84 --- /dev/null +++ b/anda/games/joycond/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "joycond.spec" + } +} diff --git a/anda/games/joycond/joycond.spec b/anda/games/joycond/joycond.spec new file mode 100644 index 0000000000..9791b7d5f6 --- /dev/null +++ b/anda/games/joycond/joycond.spec @@ -0,0 +1,45 @@ +Name: joycond +Version: 0.1.0 +Release: 1%?dist +Summary: Userspace daemon to combine joy-cons from the hid-nintendo kernel driver +License: GPL-3.0-or-later +URL: https://github.com/DanielOgorchock/joycond +Source0: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko +BuildRequires: libevdev-devel libudev-devel +BuildRequires: cmake make systemd-rpm-macros gcc-c++ + +%description +joycond is a linux daemon which uses the evdev devices provided by hid-nintendo +(formerly known as hid-joycon) to implement joycon pairing. + +%prep +%autosetup + +%build +%cmake . +%cmake_build + +%install +cd redhat-linux-build/ +cp joycond .. +%make_install + +mkdir -p %buildroot%_unitdir +mv %buildroot%_sysconfdir/systemd/system/joycond.service %buildroot%_unitdir/joycond.service + +%post +%systemd_post joycond.service + +%preun +%systemd_preun joycond.service + +%postun +%systemd_postun_with_restart joycond.service + +%files +%_bindir/joycond +%_udevrulesdir/72-joycond.rules +%_udevrulesdir/89-joycond.rules +%_unitdir/joycond.service +%_sysconfdir/modules-load.d/joycond.conf diff --git a/anda/games/joycond/update.rhai b/anda/games/joycond/update.rhai new file mode 100644 index 0000000000..9f93983624 --- /dev/null +++ b/anda/games/joycond/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("DanielOgorchock/joycond"));