From dc2fdf776c50d3ffa21283dc0923558277d86f10 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Wed, 21 Dec 2022 11:37:53 -0600 Subject: [PATCH] Initial Fedora package Signed-off-by: Michel Alexandre Salim --- .gitignore | 1 + rust-smartstring.spec | 133 ++++++++++++++++++++++++++++++++++ smartstring-fix-metadata.diff | 11 +++ sources | 1 + 4 files changed, 146 insertions(+) create mode 100644 .gitignore create mode 100644 rust-smartstring.spec create mode 100644 smartstring-fix-metadata.diff create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b548870 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/smartstring-1.0.1.crate diff --git a/rust-smartstring.spec b/rust-smartstring.spec new file mode 100644 index 0000000..e6e6189 --- /dev/null +++ b/rust-smartstring.spec @@ -0,0 +1,133 @@ +# Generated by rust2rpm 23 +%bcond_without check +%global debug_package %{nil} + +%global crate smartstring + +Name: rust-smartstring +Version: 1.0.1 +Release: %autorelease +Summary: Compact inlined strings + +License: MPL-2.0+ +URL: https://crates.io/crates/smartstring +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# - drop benchmark-only criterion dev-dependency to speed up builds +Patch: smartstring-fix-metadata.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Compact inlined strings.} + +%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}/LICENCE.md +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/CODE_OF_CONDUCT.md +%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}+arbitrary-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+arbitrary-devel %{_description} + +This package contains library source intended for building other packages which +use the "arbitrary" feature of the "%{crate}" crate. + +%files -n %{name}+arbitrary-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+proptest-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+proptest-devel %{_description} + +This package contains library source intended for building other packages which +use the "proptest" feature of the "%{crate}" crate. + +%files -n %{name}+proptest-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+test-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+test-devel %{_description} + +This package contains library source intended for building other packages which +use the "test" feature of the "%{crate}" crate. + +%files -n %{name}+test-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -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/smartstring-fix-metadata.diff b/smartstring-fix-metadata.diff new file mode 100644 index 0000000..e470f54 --- /dev/null +++ b/smartstring-fix-metadata.diff @@ -0,0 +1,11 @@ +--- smartstring-1.0.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ smartstring-1.0.1/Cargo.toml 2022-12-20T22:19:00.675361+00:00 +@@ -45,8 +45,6 @@ + + [dependencies.static_assertions] + version = "1" +-[dev-dependencies.criterion] +-version = "0.3" + + [dev-dependencies.proptest] + version = "1" diff --git a/sources b/sources new file mode 100644 index 0000000..b3676cd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (smartstring-1.0.1.crate) = 18e359d869bf006d49d6981c26a31ed73424c2734d8225c235b5f3c65124e5ca9d5f5bc95f4b190dc65746b73f31e2588bf9f50eb2b30535e5d05ebcd23ad760