From f9398f9c1d219a0de85824eab21779cc41a98742 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Oct 2024 15:09:43 -0400 Subject: [PATCH] Initial package (close RHBZ#2314085) --- .gitignore | 1 + rust-rancor.rpmlintrc | 2 ++ rust-rancor.spec | 84 +++++++++++++++++++++++++++++++++++++++++++ rust2rpm.toml | 11 ++++++ sources | 1 + 5 files changed, 99 insertions(+) create mode 100644 .gitignore create mode 100644 rust-rancor.rpmlintrc create mode 100644 rust-rancor.spec create mode 100644 rust2rpm.toml create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df6d544 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rancor-0.1.0.crate diff --git a/rust-rancor.rpmlintrc b/rust-rancor.rpmlintrc new file mode 100644 index 0000000..0244557 --- /dev/null +++ b/rust-rancor.rpmlintrc @@ -0,0 +1,2 @@ +# Feature metapackages are not supposed to have documentation! +addFilter(r"\+[-_\w]+-devel.noarch: W: no-documentation") diff --git a/rust-rancor.spec b/rust-rancor.spec new file mode 100644 index 0000000..35fa732 --- /dev/null +++ b/rust-rancor.spec @@ -0,0 +1,84 @@ +# Generated by rust2rpm 26 +%bcond_without check +%global debug_package %{nil} + +%global crate rancor + +Name: rust-rancor +Version: 0.1.0 +Release: %autorelease +Summary: Scalable and efficient error handling without type composition + +License: MIT +URL: https://crates.io/crates/rancor +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: dos2unix + +%global _description %{expand: +Scalable and efficient error handling without type composition.} + +%description %{_description} + +%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 +%license %{crate_instdir}/LICENSE +%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}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +# The crate has a mixture of newline styles. +# https://github.com/rkyv/rancor/commit/b65012a3848487155c072682b151f50599404bae +find . -type f | xargs -r -t dos2unix --keepdate +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..5c1a9fa --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,11 @@ +[requires] +build = [ + "dos2unix", +] + +[scripts.prep] +pre = [ + "# The crate has a mixture of newline styles.", + "# https://github.com/rkyv/rancor/commit/b65012a3848487155c072682b151f50599404bae", + "find . -type f | xargs -r -t dos2unix --keepdate", +] diff --git a/sources b/sources new file mode 100644 index 0000000..f5a16f6 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rancor-0.1.0.crate) = cf3d469c487bc8261154e07147d96bc6447c5fcc5416004bdc19dd237c985fd2880bd89f3621b9dfd3178455b39fbf266961e7f73fdef5299856bb62cc62a5c6