From 1d9bb99914aa8a5931021e7015467d9a1f0f3a94 Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Thu, 9 Feb 2023 20:30:44 +0800 Subject: [PATCH] add: imager --- anda/rust/imager/anda.hcl | 5 ++ anda/rust/imager/rust-imager.spec | 87 +++++++++++++++++++++++++++++++ anda/rust/imager/update.rhai | 1 + 3 files changed, 93 insertions(+) create mode 100644 anda/rust/imager/anda.hcl create mode 100644 anda/rust/imager/rust-imager.spec create mode 100644 anda/rust/imager/update.rhai diff --git a/anda/rust/imager/anda.hcl b/anda/rust/imager/anda.hcl new file mode 100644 index 0000000000..c170965ea6 --- /dev/null +++ b/anda/rust/imager/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-imager.spec" + } +} diff --git a/anda/rust/imager/rust-imager.spec b/anda/rust/imager/rust-imager.spec new file mode 100644 index 0000000000..d18fbb8cf0 --- /dev/null +++ b/anda/rust/imager/rust-imager.spec @@ -0,0 +1,87 @@ +# Generated by rust2rpm 23 +%bcond_without check + +%global crate imager + +Name: rust-imager +Version: 0.3.2 +Release: %autorelease +Summary: Automated image compression; optimizes the compression using various heuristics + +License: MPL-2.0 +URL: https://crates.io/crates/imager +Source: %{crates_source} + +BuildRequires: openssl anda-srpm-macros rust-packaging >= 21 + +%global _description %{expand: +Automated image compression; optimizes the compression using various +heuristics.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} %{_description} + +%files -n %{crate} +# FIXME: no license files detected +%doc README.md +%{_bindir}/imager + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +# FIXME: no license files detected +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+buildtype-docs-only-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+buildtype-docs-only-devel %{_description} + +This package contains library source intended for building other packages which +use the "buildtype-docs-only" feature of the "%{crate}" crate. + +%files -n %{name}+buildtype-docs-only-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep_online + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/anda/rust/imager/update.rhai b/anda/rust/imager/update.rhai new file mode 100644 index 0000000000..16da0a6f67 --- /dev/null +++ b/anda/rust/imager/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("imager"));