From 18f1a8703caea7116141d53689bdea0baae0b9c1 Mon Sep 17 00:00:00 2001 From: blinxen Date: Sun, 8 Oct 2023 11:14:02 +0200 Subject: [PATCH] Initial package (rhbz#2242618) --- .gitignore | 1 + README.md | 3 -- rust-str_indices.spec | 85 +++++++++++++++++++++++++++++++++++ sources | 1 + str_indices-fix-metadata.diff | 13 ++++++ 5 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-str_indices.spec create mode 100644 sources create mode 100644 str_indices-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0759bc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/str_indices-0.4.1.crate diff --git a/README.md b/README.md deleted file mode 100644 index 61441fa..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-str_indices - -The rust-str_indices package diff --git a/rust-str_indices.spec b/rust-str_indices.spec new file mode 100644 index 0000000..b8559b2 --- /dev/null +++ b/rust-str_indices.spec @@ -0,0 +1,85 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate str_indices + +Name: rust-str_indices +Version: 0.4.1 +Release: %autorelease +Summary: Count and convert between indexing schemes on string slices + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/str_indices +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * Drop benchmark dependency +Patch: str_indices-fix-metadata.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Count and convert between indexing schemes on string slices.} + +%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-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.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}+simd-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+simd-devel %{_description} + +This package contains library source intended for building other packages which +use the "simd" feature of the "%{crate}" crate. + +%files -n %{name}+simd-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/sources b/sources new file mode 100644 index 0000000..bd7c86f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (str_indices-0.4.1.crate) = 3ef64bde04a57e5946854f7b2adc7fb8cd01d885046b0b31d02f2155e3c3b29d2004d55cf69d54c3bbba661487a9dfd351a41144603838cc15391e3dcacf69a0 diff --git a/str_indices-fix-metadata.diff b/str_indices-fix-metadata.diff new file mode 100644 index 0000000..df5d312 --- /dev/null +++ b/str_indices-fix-metadata.diff @@ -0,0 +1,13 @@ +--- str_indices-0.4.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ str_indices-0.4.1/Cargo.toml 2023-10-06T20:21:48.059823+00:00 +@@ -38,10 +38,6 @@ + + [dependencies] + +-[dev-dependencies.criterion] +-version = "0.3" +-features = ["html_reports"] +- + [dev-dependencies.proptest] + version = "1.0" +