From b90e576c1aafbcececd4be82c19c8fe181577cb1 Mon Sep 17 00:00:00 2001 From: june <159748074+june-fish@users.noreply.github.com> Date: Sun, 25 Aug 2024 18:25:45 -0500 Subject: [PATCH] add quirks (#1998) --- anda/system/duet-quirks/anda.hcl | 8 +++++ anda/system/duet-quirks/duet-quirks.spec | 39 ++++++++++++++++++++++++ anda/system/duet-quirks/update.rhai | 7 +++++ 3 files changed, 54 insertions(+) create mode 100644 anda/system/duet-quirks/anda.hcl create mode 100644 anda/system/duet-quirks/duet-quirks.spec create mode 100644 anda/system/duet-quirks/update.rhai diff --git a/anda/system/duet-quirks/anda.hcl b/anda/system/duet-quirks/anda.hcl new file mode 100644 index 0000000000..1ad2b50c84 --- /dev/null +++ b/anda/system/duet-quirks/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "duet-quirks.spec" + } + labels { + nightly = "1" + } +} diff --git a/anda/system/duet-quirks/duet-quirks.spec b/anda/system/duet-quirks/duet-quirks.spec new file mode 100644 index 0000000000..fc1ff4c313 --- /dev/null +++ b/anda/system/duet-quirks/duet-quirks.spec @@ -0,0 +1,39 @@ +%global commit_date 20240824 +%global commit d22b585a81b8645f1d660b4db22c95231c4301cf +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global debug_package %{nil} +%define __os_install_post %{nil} + +Name: duet-quirks +Version: %commit_date.%shortcommit +Release: 1%?dist + +License: CC-BY-SA-4.0 +Summary: Quirks for the Lenovo Duet Chromebooks on Ultramarine Linux +URL: https://github.com/Ultramarine-Linux/duet-quirks +Source0: https://github.com/Ultramarine-Linux/duet-quirks/archive/%{commit}/duet-quirks-%{commit}.tar.gz + +Requires: udev libinput + +BuildArch: noarch + +%description +Quirks for the Lenovo Duet Chromebooks on Ultramarine Linux. +Including a libinput rule for trackpad configuration and a udev rule for display rotation. + +%prep +%autosetup -n duet-quirks-%commit + +%install +install -Dm644 udev/61-cros-ec-accel.rules %buildroot%{_sysconfdir}/udev/61-cros-ec-accel.rules +install -Dm644 libinput/local-overrides.quirks %buildroot%{_sysconfdir}/libinput/local-overrides.quirks + +%files +%doc README.md +%license LICENSE +%{_sysconfdir}/udev/61-cros-ec-accel.rules +%{_sysconfdir}/libinput/local-overrides.quirks + +%changelog +* Sat Aug 25 2024 junefish +- Initial package diff --git a/anda/system/duet-quirks/update.rhai b/anda/system/duet-quirks/update.rhai new file mode 100644 index 0000000000..8b4075effd --- /dev/null +++ b/anda/system/duet-quirks/update.rhai @@ -0,0 +1,7 @@ +if filters.contains("nightly") { + rpm.global("commit", gh_commit("Ultramarine-Linux/duet-quirks")); + if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); + } +}