From 4c985cead6ea4b482989168260b25d4a1bcb55ce Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 14 Nov 2025 00:20:59 -0800 Subject: [PATCH] add: rustypaste (#7375) (#7376) (cherry picked from commit 9e22b0ab162d242c316c4fc99137d2035db26ca1) Signed-off-by: Owen-sz Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/tools/rustypaste/anda.hcl | 5 +++ anda/tools/rustypaste/rustypaste.spec | 62 +++++++++++++++++++++++++++ anda/tools/rustypaste/update.rhai | 1 + 3 files changed, 68 insertions(+) create mode 100644 anda/tools/rustypaste/anda.hcl create mode 100644 anda/tools/rustypaste/rustypaste.spec create mode 100644 anda/tools/rustypaste/update.rhai diff --git a/anda/tools/rustypaste/anda.hcl b/anda/tools/rustypaste/anda.hcl new file mode 100644 index 0000000000..bea61f3031 --- /dev/null +++ b/anda/tools/rustypaste/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rustypaste.spec" + } +} diff --git a/anda/tools/rustypaste/rustypaste.spec b/anda/tools/rustypaste/rustypaste.spec new file mode 100644 index 0000000000..fa65d5f853 --- /dev/null +++ b/anda/tools/rustypaste/rustypaste.spec @@ -0,0 +1,62 @@ +%define __brp_mangle_shebangs %{nil} + +Name: rustypaste +Version: 0.16.1 +Release: 1%?dist +Summary: A minimal file upload/pastebin service +License: MIT +URL: https://github.com/orhun/rustypaste +Source0: %url/archive/refs/tags/v%{version}.tar.gz + +BuildRequires: anda-srpm-macros +BuildRequires: cargo-rpm-macros +BuildRequires: gcc +BuildRequires: cargo +BuildRequires: mold +BuildRequires: systemd-rpm-macros + +Packager: Owen Zimmerman + +%description +%{summary}. + +%prep +%autosetup -n %{name}-%{version} +%cargo_prep_online + +%build +%cargo_build + +%install +install -Dm755 target/rpm/rustypaste %{buildroot}%{_bindir}/rustypaste +install -Dm644 config.toml %{buildroot}%{_sysconfdir}/rustypaste/config.toml +install -Dm644 extra/systemd/rustypaste.env %{buildroot}%{_sysconfdir}/rustypaste/rustypaste.env +install -Dm644 extra/systemd/rustypaste.service %{buildroot}/usr/lib/systemd/system/rustypaste.service +install -Dm644 extra/systemd257+/rustypaste.sysusers %{buildroot}/usr/lib/sysusers.d/rustypaste.conf +install -Dm644 extra/systemd/rustypaste.tmpfiles %{buildroot}/usr/lib/tmpfiles.d/rustypaste.conf +%cargo_license_summary_online +%{cargo_license_online -a} > LICENSE.dependencies + +%post +%systemd_post swayosd-libinput-backend.service + +%preun +%systemd_preun swayosd-libinput-backend.service + +%postun +%systemd_postun_with_restart swayosd-libinput-backend.service + +%files +%doc README.md CHANGELOG.md RELEASE.md +%license LICENSE +%license LICENSE.dependencies +%{_bindir}/rustypaste +%{_sysconfdir}/rustypaste/config.toml +%{_sysconfdir}/rustypaste/rustypaste.env +%{_unitdir}/rustypaste.service +%{_sysusersdir}/rustypaste.conf +%{_tmpfilesdir}/rustypaste.conf + +%changelog +* Thu Nov 13 2025 Owen Zimmerman +- Initial commit diff --git a/anda/tools/rustypaste/update.rhai b/anda/tools/rustypaste/update.rhai new file mode 100644 index 0000000000..41404c1e74 --- /dev/null +++ b/anda/tools/rustypaste/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("orhun/rustypaste")); \ No newline at end of file