diff --git a/.gitignore b/.gitignore index 9ac9143..1e21fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /sha1-0.2.0.crate /sha1-0.4.0.crate /sha1-0.6.0.crate +/sha1-0.10.0.crate +/sha1-0.10.1.crate diff --git a/.rust2rpm.conf b/.rust2rpm.conf new file mode 100644 index 0000000..5f210cf --- /dev/null +++ b/.rust2rpm.conf @@ -0,0 +1,4 @@ +[DEFAULT] +unwanted-features = + asm + sha1-asm diff --git a/0001-guard-hexdigest-doctest-by-cfg-feature-std.patch b/0001-guard-hexdigest-doctest-by-cfg-feature-std.patch deleted file mode 100644 index 9bb59e3..0000000 --- a/0001-guard-hexdigest-doctest-by-cfg-feature-std.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 27c7f771d43fdab5a54af6bad190830262d12474 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Thu, 26 Apr 2018 09:35:50 +0200 -Subject: [PATCH] guard hexdigest() doctest by cfg(feature=std) - -Fixes: https://github.com/mitsuhiko/rust-sha1/issues/34 ---- - src/lib.rs | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/lib.rs b/src/lib.rs -index 446c98b..a83e1e6 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -26,6 +26,7 @@ - //! ``` - //! extern crate sha1; - //! # fn main() { -+//! #[cfg(feature="std")] - //! assert_eq!(sha1::Sha1::from("Hello World!").hexdigest(), - //! "2ef7bde608ce5404e97d5f042f95f89f1c232871"); - //! # } --- -2.17.0 - diff --git a/rust-sha1.spec b/rust-sha1.spec index 1a986ca..c9a11f5 100644 --- a/rust-sha1.spec +++ b/rust-sha1.spec @@ -1,30 +1,25 @@ -# Generated by rust2rpm 10 +# Generated by rust2rpm 20 %bcond_without check %global debug_package %{nil} %global crate sha1 Name: rust-%{crate} -Version: 0.6.0 +Version: 0.10.1 Release: %autorelease -Summary: Minimal implementation of SHA1 for Rust +Summary: SHA-1 hash function -# Upstream license specification: BSD-3-Clause -License: BSD +# Upstream license specification: MIT OR Apache-2.0 +License: MIT or ASL 2.0 URL: https://crates.io/crates/sha1 Source: %{crates_source} -# https://github.com/mitsuhiko/rust-sha1/pull/35 -Patch0001: 0001-guard-hexdigest-doctest-by-cfg-feature-std.patch ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif BuildRequires: rust-packaging %global _description %{expand: -Minimal implementation of SHA1 for Rust.} +SHA-1 hash function.} %description %{_description} @@ -34,14 +29,13 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,upload-docs.sh} +%license LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} @@ -49,23 +43,35 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +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}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+compress-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+compress-devel %{_description} + +This package contains library source intended for building other packages which +use the "compress" feature of the "%{crate}" crate. + +%files -n %{name}+compress-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml -%package -n %{name}+serde-devel +%package -n %{name}+force-soft-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+serde-devel %{_description} +%description -n %{name}+force-soft-devel %{_description} -This package contains library source intended for building other packages -which use "serde" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "force-soft" feature of the "%{crate}" crate. -%files -n %{name}+serde-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%files -n %{name}+force-soft-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} @@ -73,11 +79,11 @@ BuildArch: noarch %description -n %{name}+std-devel %{_description} -This package contains library source intended for building other packages -which use "std" feature of "%{crate}" crate. +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 %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index 4968ced..4e06b9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sha1-0.6.0.crate) = 32081c99a0cd5fd6e651deb711eb4c9a8bc71c12e26b25a72b2dba9a3286502e56b23d068a2899764ce1cc0c615c2c1b22a6c7aae63e07a758745b533e70ff0c +SHA512 (sha1-0.10.1.crate) = 5f32cfff707d08dfcf0c826ddd723fbdb7e1e29614f6b303c2707dd75ef3b599a5e2b48ebdd570e2e731b02dbcbe2557e91f2d1c5cb44d0afb3d8a46c38c89a4