diff --git a/anda/system/croskbd/anda.hcl b/anda/system/croskbd/anda.hcl new file mode 100644 index 0000000000..1dafa1d896 --- /dev/null +++ b/anda/system/croskbd/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "croskbd.spec" + } +} diff --git a/anda/system/croskbd/croskbd.spec b/anda/system/croskbd/croskbd.spec new file mode 100644 index 0000000000..293ca006cf --- /dev/null +++ b/anda/system/croskbd/croskbd.spec @@ -0,0 +1,43 @@ +Name: croskbd +Version: 0.1.0 +Release: 1%{?dist} +Summary: Chromebook Keyboard Daemon + +License: BSD-3-Clause +URL: https://github.com/WeirdTreeThing/croskbd +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz + +Packager: Owen Zimmerman + +BuildRequires: make gcc systemd-rpm-macros + +%description +%{summary}. + +%prep +%autosetup -n %{name}-%{version} + +%build +%make_build + +%install +%make_install DESTDIR=%{buildroot} PREFIX=%{_prefix} install install_systemd + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%files +%license LICENSE +%doc README.md +%{_bindir}/%{name} +%{_unitdir}/%{name}.service + +%changelog +* Tue Oct 07 2025 Owen-sz +- Initial commit diff --git a/anda/system/croskbd/update.rhai b/anda/system/croskbd/update.rhai new file mode 100644 index 0000000000..5a91c00fd2 --- /dev/null +++ b/anda/system/croskbd/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("WeirdTreeThing/croskbd")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +}