From deb18d2fa7821ba2bdc7bdf581c399650fd0761e Mon Sep 17 00:00:00 2001 From: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:16:38 -0600 Subject: [PATCH] Add: Polycrystal (#2498) * Add: Polycrystal * switch from commit based to release based * WIP - add systemd macros and potential preset file calling * install service file * Forgot to put the preset file in the files section * update changelog * add config and data dirs * enable systemd scriptlets * create empty dirs * fix changelog and update version * add buildroot prefixes * remove config line --------- Co-authored-by: madomado Co-authored-by: lea --- anda/system/polycrystal/anda.hcl | 5 +++ anda/system/polycrystal/polycrystal.spec | 49 ++++++++++++++++++++++++ anda/system/polycrystal/update.rhai | 1 + 3 files changed, 55 insertions(+) create mode 100644 anda/system/polycrystal/anda.hcl create mode 100644 anda/system/polycrystal/polycrystal.spec create mode 100644 anda/system/polycrystal/update.rhai diff --git a/anda/system/polycrystal/anda.hcl b/anda/system/polycrystal/anda.hcl new file mode 100644 index 0000000000..fbac774bba --- /dev/null +++ b/anda/system/polycrystal/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "polycrystal.spec" + } +} \ No newline at end of file diff --git a/anda/system/polycrystal/polycrystal.spec b/anda/system/polycrystal/polycrystal.spec new file mode 100644 index 0000000000..536002f422 --- /dev/null +++ b/anda/system/polycrystal/polycrystal.spec @@ -0,0 +1,49 @@ +Name: polycrystal +Version: 0.2.0 +Release: 1%?dist +Summary: Barebones "automatic" Flatpak installer for distribution-default Flatpak packages. +URL: https://github.com/Ultramarine-Linux/polycrystal +Source0: %url/archive/refs/tags/v%version.tar.gz +License: GPL +BuildRequires: cargo cmake anda-srpm-macros cargo-rpm-macros systemd-rpm-macros mold glib2-devel flatpak-devel +Packager: Owen Zimmerman + +%description +%summary + +%prep +%autosetup -n polycrystal-%version +%cargo_prep_online + +%build +%cargo_build + +%install +mkdir -p %{buildroot}%{_datadir}/polycrystal %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/polycrystal/entries %{buildroot}%{_sharedstatedir}/polycrystal +%cargo_install +install -Dm644 polycrystal.service %{buildroot}%{_unitdir}/polycrystal.service + +%post +%systemd_post polycrystal.service + +%preun +%systemd_preun polycrystal.service + +%postun +%systemd_postun_with_restart polycrystal.service + +%files +%{_bindir}/polycrystal +%{_datadir}/polycrystal/ +%{_unitdir}/polycrystal.service +%dir %{_sysconfdir}/polycrystal +%dir %{_sysconfdir}/polycrystal/entries +%dir %{_sharedstatedir}/polycrystal +%license LICENSE +%doc README.md + +%changelog +* Tue Nov 19 2024 Owen-sz +- Switch from commit based to release based, and add systemd services +* Fri Nov 15 2024 Owen-sz +- Package Polycrystal \ No newline at end of file diff --git a/anda/system/polycrystal/update.rhai b/anda/system/polycrystal/update.rhai new file mode 100644 index 0000000000..e9ccc09743 --- /dev/null +++ b/anda/system/polycrystal/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("Ultramarine-Linux/polycrystal")); \ No newline at end of file