diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..472b7a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/memmem-0.1.1.crate diff --git a/memmem-fix-metadata.diff b/memmem-fix-metadata.diff new file mode 100644 index 0000000..33734e6 --- /dev/null +++ b/memmem-fix-metadata.diff @@ -0,0 +1,9 @@ +--- memmem-0.1.1/Cargo.toml 2016-05-01T10:14:34+00:00 ++++ memmem-0.1.1/Cargo.toml 2022-01-28T14:39:10.954847+00:00 +@@ -9,5 +9,5 @@ + license = "MIT/Apache-2.0" + + [dev-dependencies] +-quickcheck = "0.2" ++quickcheck = "1.0" + diff --git a/rust-memmem.spec b/rust-memmem.spec new file mode 100644 index 0000000..0c80565 --- /dev/null +++ b/rust-memmem.spec @@ -0,0 +1,74 @@ +# Generated by rust2rpm 20 +%bcond_without check +%global debug_package %{nil} + +%global crate memmem + +Name: rust-%{crate} +Version: 0.1.1 +Release: %autorelease +Summary: Substring searching + +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/memmem +Source: %{crates_source} +# Initial patched metadata +# Bump quickcheck to 1.0 +Patch0: memmem-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Substring searching.} + +%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 LICENSE-APACHE LICENSE-MIT +%doc README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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 %{cargo_registry}/%{crate}-%{version_no_tilde}/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..19ae585 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (memmem-0.1.1.crate) = f4ee8123e0263c30898ff1e397bb3daf4e027aadf520977ccaf5bfc4ec8158b398a19bae6d48a85a084e43d80d5ddcbb3cbfdf986080041ce958d2c8f5eb897a