diff --git a/rust-sha2.spec b/rust-sha2.spec index 1ca328b..97166ca 100644 --- a/rust-sha2.spec +++ b/rust-sha2.spec @@ -1,36 +1,31 @@ -# Generated by rust2rpm -# * hex-literal is not packaged -%bcond_with check +# Generated by rust2rpm 10 +%bcond_without check %global debug_package %{nil} %global crate sha2 Name: rust-%{crate} Version: 0.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: SHA-2 hash functions # Upstream license specification: MIT OR Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/sha2 Source: %{crates_source} +# Initial patched metadata +# * Update hex-literal to 0.2, https://github.com/RustCrypto/hashes/pull/85 +Patch0: sha2-fix-metadata.diff ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif BuildRequires: rust-packaging -BuildRequires: (crate(block-buffer/default) >= 0.7.0 with crate(block-buffer/default) < 0.8.0) -BuildRequires: (crate(digest/default) >= 0.8.0 with crate(digest/default) < 0.9.0) -BuildRequires: (crate(digest/std) >= 0.8.0 with crate(digest/std) < 0.9.0) -BuildRequires: (crate(fake-simd/default) >= 0.1.0 with crate(fake-simd/default) < 0.2.0) -BuildRequires: (crate(opaque-debug/default) >= 0.2.0 with crate(opaque-debug/default) < 0.3.0) -%if %{with check} -BuildRequires: (crate(digest/default) >= 0.8.0 with crate(digest/default) < 0.9.0) -BuildRequires: (crate(digest/dev) >= 0.8.0 with crate(digest/dev) < 0.9.0) -BuildRequires: (crate(hex-literal/default) >= 0.1.0 with crate(hex-literal/default) < 0.2.0) -%endif -%global _description \ -SHA-2 hash functions. +%global _description %{expand: +SHA-2 hash functions.} %description %{_description} @@ -59,6 +54,30 @@ which use "default" feature of "%{crate}" crate. %files -n %{name}+default-devel %ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%package -n %{name}+asm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+asm-devel %{_description} + +This package contains library source intended for building other packages +which use "asm" feature of "%{crate}" crate. + +%files -n %{name}+asm-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+sha2-asm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+sha2-asm-devel %{_description} + +This package contains library source intended for building other packages +which use "sha2-asm" feature of "%{crate}" crate. + +%files -n %{name}+sha2-asm-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + %package -n %{name}+std-devel Summary: %{summary} BuildArch: noarch @@ -75,6 +94,9 @@ which use "std" feature of "%{crate}" crate. %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep +%generate_buildrequires +%cargo_generate_buildrequires + %build %cargo_build @@ -87,5 +109,8 @@ which use "std" feature of "%{crate}" crate. %endif %changelog +* Fri Jun 21 20:05:55 CEST 2019 Igor Gnatenko - 0.8.0-2 +- Regenerate + * Wed Mar 13 2019 Igor Gnatenko - 0.8.0-1 - Initial package diff --git a/sha2-fix-metadata.diff b/sha2-fix-metadata.diff new file mode 100644 index 0000000..df57fee --- /dev/null +++ b/sha2-fix-metadata.diff @@ -0,0 +1,11 @@ +--- sha2-0.8.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ sha2-0.8.0/Cargo.toml 2019-06-21T18:05:55.064467+00:00 +@@ -40,7 +40,7 @@ + features = ["dev"] + + [dev-dependencies.hex-literal] +-version = "0.1" ++version = "0.2" + + [features] + asm = ["sha2-asm"]