From 655760131138933a0e06a927ceb99db8fd030d75 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:46:26 -0800 Subject: [PATCH] add: koji (#3453) (#3458) * add: koji * remove crate * anda-srpm-macros * buildrequires openssl * update licenses * put conflicts tag in the right place (cherry picked from commit 79d231a2fea5810615c1afb963733da6ae645f22) Co-authored-by: sadlerm4 --- anda/langs/rust/koji/anda.hcl | 5 +++ anda/langs/rust/koji/rust-koji.spec | 52 +++++++++++++++++++++++++++++ anda/langs/rust/koji/update.rhai | 1 + 3 files changed, 58 insertions(+) create mode 100644 anda/langs/rust/koji/anda.hcl create mode 100644 anda/langs/rust/koji/rust-koji.spec create mode 100644 anda/langs/rust/koji/update.rhai diff --git a/anda/langs/rust/koji/anda.hcl b/anda/langs/rust/koji/anda.hcl new file mode 100644 index 0000000000..ee60a4e5d4 --- /dev/null +++ b/anda/langs/rust/koji/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-koji.spec" + } +} diff --git a/anda/langs/rust/koji/rust-koji.spec b/anda/langs/rust/koji/rust-koji.spec new file mode 100644 index 0000000000..c481ac460c --- /dev/null +++ b/anda/langs/rust/koji/rust-koji.spec @@ -0,0 +1,52 @@ +# Generated by rust2rpm 27 +%global crate koji +# differentiate from fedora koji +%global diffname git-%{crate} +%global altdiffname cococonscious-%{crate} + +Name: rust-koji +Version: 3.2.0 +Release: 1%{?dist} +Summary: Interactive CLI for creating conventional commits + +License: MIT +URL: https://crates.io/crates/koji +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 anda-srpm-macros +BuildRequires: openssl-devel + +%global _description %{expand: +An interactive CLI for creating conventional commits.} + +%description %{_description} + +%package -n %{diffname} +Summary: %{summary} +License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown +Provides: cococonscious-%{crate} = %{version}-%{release} +Conflicts: koji + +%description -n %{diffname} %{_description} + +%files -n %{diffname} +%license LICENSE +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc README.md +%{_bindir}/%{diffname} +%{_bindir}/%{crate} + +%prep +%autosetup -n %{crate}-%{version} +%cargo_prep_online + +%build +%cargo_build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +install -Dm755 target/rpm/%{crate} %{buildroot}%{_bindir}/%{diffname} +%{__ln} -sf %{diffname} %{buildroot}%{_bindir}/%{crate} diff --git a/anda/langs/rust/koji/update.rhai b/anda/langs/rust/koji/update.rhai new file mode 100644 index 0000000000..1c61ddea9e --- /dev/null +++ b/anda/langs/rust/koji/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("koji"));