From af4f136e685eab9df3c0aa1b527f567ebab2054b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 10 Sep 2024 13:11:56 -0400 Subject: [PATCH] Initial package (close RHBZ#2310860) --- .gitignore | 1 + rust-zerofrom.rplintrc | 2 + rust-zerofrom.spec | 92 ++++++++++++++++++++++++++++++++++++++++++ rust2rpm.toml | 6 +++ sources | 1 + 5 files changed, 102 insertions(+) create mode 100644 .gitignore create mode 100644 rust-zerofrom.rplintrc create mode 100644 rust-zerofrom.spec create mode 100644 rust2rpm.toml create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cafef3b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zerofrom-0.1.4.crate diff --git a/rust-zerofrom.rplintrc b/rust-zerofrom.rplintrc new file mode 100644 index 0000000..0244557 --- /dev/null +++ b/rust-zerofrom.rplintrc @@ -0,0 +1,2 @@ +# Feature metapackages are not supposed to have documentation! +addFilter(r"\+[-_\w]+-devel.noarch: W: no-documentation") diff --git a/rust-zerofrom.spec b/rust-zerofrom.spec new file mode 100644 index 0000000..9fa6bed --- /dev/null +++ b/rust-zerofrom.spec @@ -0,0 +1,92 @@ +# Generated by rust2rpm 26 +%bcond_without check +%global debug_package %{nil} + +%global crate zerofrom + +Name: rust-zerofrom +Version: 0.1.4 +Release: %autorelease +Summary: ZeroFrom trait for constructing + +License: Unicode-3.0 +URL: https://crates.io/crates/zerofrom +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +ZeroFrom trait for constructing.} + +%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 + +%package -n %{name}+derive-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+derive-devel %{_description} + +This package contains library source intended for building other packages which +use the "derive" feature of the "%{crate}" crate. + +%files -n %{name}+derive-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%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..90bf329 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,6 @@ +[package] +# The rust2rpm-generated summary would be "Trait for constructing" because +# rust2rpm attempts to remove the crate name from the beginning of the summary. +# In this case, the result doesn’t make much sense, so we restore the original +# summary text. +summary = "ZeroFrom trait for constructing" diff --git a/sources b/sources new file mode 100644 index 0000000..f384696 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zerofrom-0.1.4.crate) = 11f37a67108185a8090cda71338b02492fabd15e6cfe018833a165cd869ed65338e12d7c5680ffb0b763fc3acbdff6fe4df30457653dfe4d79ecc864b69d780f