From 0a1bd7021be44dff2f0e0bee10be58ad891497c0 Mon Sep 17 00:00:00 2001 From: Gilver Date: Fri, 20 Jun 2025 00:44:17 -0500 Subject: [PATCH] add: falcond and falcond-profiles (#5571) * add: falcond and falcond-profiles * cleanup: Actually why was I doing that * cleanup: Fix some cursed formatting * cleanup: Fix the globbing * fix?: Zig fetch ahead of time? Signed-off-by: Gilver * Ah. Signed-off-by: Gilver * Env var maybe Signed-off-by: Gilver * cleanup: Remove unnecessary things * cleanup(falcond-profiles): Where did that space come from? Signed-off-by: Gilver * fix(falcond): Disable Zig system integration mode Signed-off-by: Gilver * fix: LICENSE and README path Signed-off-by: Gilver * fix: -t Signed-off-by: Gilver * fix: Build aarch64 again baseline for now Signed-off-by: Gilver * Update falcond.spec Signed-off-by: Gilver --------- Signed-off-by: Gilver --- anda/system/falcond-profiles/anda.hcl | 9 ++++ .../falcond-profiles/falcond-profiles.spec | 41 ++++++++++++++ anda/system/falcond-profiles/update.rhai | 6 +++ anda/system/falcond/anda.hcl | 5 ++ anda/system/falcond/falcond.spec | 54 +++++++++++++++++++ anda/system/falcond/update.rhai | 1 + 6 files changed, 116 insertions(+) create mode 100644 anda/system/falcond-profiles/anda.hcl create mode 100644 anda/system/falcond-profiles/falcond-profiles.spec create mode 100644 anda/system/falcond-profiles/update.rhai create mode 100644 anda/system/falcond/anda.hcl create mode 100644 anda/system/falcond/falcond.spec create mode 100644 anda/system/falcond/update.rhai diff --git a/anda/system/falcond-profiles/anda.hcl b/anda/system/falcond-profiles/anda.hcl new file mode 100644 index 0000000000..87c2fb9934 --- /dev/null +++ b/anda/system/falcond-profiles/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "falcond-profiles.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/falcond-profiles/falcond-profiles.spec b/anda/system/falcond-profiles/falcond-profiles.spec new file mode 100644 index 0000000000..249ef87ffb --- /dev/null +++ b/anda/system/falcond-profiles/falcond-profiles.spec @@ -0,0 +1,41 @@ +%global commit 96c2cdfee69761d2c29caebb4b1e9ff7cc904f7a +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250613 + +Name: falcond-profiles +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%{?dist} +Summary: Profiles for falcond +License: MIT +URL: https://github.com/PikaOS-Linux/falcond-profiles +Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +Requires: falcond +BuildArch: noarch +Packager: Gilver E. + +%description +This package contains the profiles needed for falcond. + +%prep +%autosetup -n %{name}-%{commit} + +%build +# Hi, I'm empty! + +%install +install -Dm644 usr/share/falcond/system.conf -t %{buildroot}%{_datadir}/falcond/ +install -Dm644 usr/share/falcond/profiles/*.conf -t %{buildroot}%{_datadir}/falcond/profiles/ +install -Dm644 usr/share/falcond/profiles/handheld/* -t %{buildroot}%{_datadir}/falcond/profiles/handheld/ +install -Dm644 usr/share/falcond/profiles/htpc/* -t %{buildroot}%{_datadir}/falcond/profiles/htpc/ + +%files +%doc README.md +%license LICENSE +%{_datadir}/falcond/system.conf +%{_datadir}/falcond/profiles/*.conf +%{_datadir}/falcond/profiles/handheld/*.conf +%{_datadir}/falcond/profiles/htpc/*.conf + +%changelog +* Thu Jun 19 2025 Gilver E. - 0^20250613git.96c2cdf-1 +- Initial package diff --git a/anda/system/falcond-profiles/update.rhai b/anda/system/falcond-profiles/update.rhai new file mode 100644 index 0000000000..3ff72ad483 --- /dev/null +++ b/anda/system/falcond-profiles/update.rhai @@ -0,0 +1,6 @@ +rpm.global("commit", gh_commit("PikaOS-Linux/falcond-profiles")); + if rpm.changed() { + rpm.global("commit_date", date()); + rpm.release(); + } +} diff --git a/anda/system/falcond/anda.hcl b/anda/system/falcond/anda.hcl new file mode 100644 index 0000000000..0b5df9a392 --- /dev/null +++ b/anda/system/falcond/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "falcond.spec" + } +} diff --git a/anda/system/falcond/falcond.spec b/anda/system/falcond/falcond.spec new file mode 100644 index 0000000000..55ce4b8c55 --- /dev/null +++ b/anda/system/falcond/falcond.spec @@ -0,0 +1,54 @@ +%global _include_minidebuginfo 0 + +Name: falcond +Version: 1.1.5 +Release: 1%{?dist} +Summary: Advanced Linux Gaming Performance Daemon +License: MIT +URL: https://git.pika-os.com/general-packages/falcond +Source0: %{url}/archive/v%{version}.tar.gz +BuildRequires: anda-srpm-macros >= 0.2.18 +BuildRequires: systemd-rpm-macros +BuildRequires: zig >= 0.14.0 +BuildRequires: zig-rpm-macros +Requires: %{name}-profiles +Requires: (scx-scheds or scx-scheds-nightly) +Conflicts: gamemode +Packager: Gilver E. + +%description +falcond is a powerful system daemon designed to automatically optimize your Linux gaming experience. It intelligently manages system resources and performance settings on a per-game basis, eliminating the need to manually configure settings for each game. + +%prep +%autosetup -n %{name}/%{name} + +%build + +%install +install -Dm644 debian/%{name}.service -t %{buildroot}%{_unitdir} +# When DNF supports microarchitectures the fallback option for -c can be used here instead +DESTDIR="%{buildroot}" \ +%ifarch x86_64 x86_64_v2 x86_64_v3 x86_64_v4 +%{zig_build_target -r fast -c x86_64_v3 -s} \ +%elifarch aarch64 +%{zig_build_target -r fast -s} \ +%endif + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%files +%doc ../README.md +%license ../LICENSE +%{_bindir}/%{name} +%{_unitdir}/%{name}.service + +%changelog +* Thu Jun 19 2025 Gilver E. - 1.1.5-1 +- Initial package diff --git a/anda/system/falcond/update.rhai b/anda/system/falcond/update.rhai new file mode 100644 index 0000000000..b1dc91a1bb --- /dev/null +++ b/anda/system/falcond/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("PikaOS-Linux/falcond"));