From e9270274339c2485c76e81a6e2bd7f9b1cca3aeb Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 2 Nov 2018 20:11:11 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-sha1.spec | 77 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/rust-sha1.spec b/rust-sha1.spec index 6321681..039ef29 100644 --- a/rust-sha1.spec +++ b/rust-sha1.spec @@ -1,5 +1,5 @@ # Generated by rust2rpm -# Tests are run in infrastructure +# * Tests are run in infrastructure %bcond_with check %global debug_package %{nil} @@ -7,9 +7,10 @@ Name: rust-%{crate} Version: 0.6.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Minimal implementation of SHA1 for Rust +# Upstream license specification: BSD-3-Clause License: BSD URL: https://crates.io/crates/sha1 Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate @@ -19,27 +20,68 @@ Patch0001: 0001-guard-hexdigest-doctest-by-cfg-feature-std.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(openssl) >= 0.10.0 with crate(openssl) < 0.11.0) -BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) -BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) +BuildRequires: (crate(openssl/default) >= 0.10.0 with crate(openssl/default) < 0.11.0) +BuildRequires: (crate(rand/default) >= 0.4.0 with crate(rand/default) < 0.5.0) +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +Minimal implementation of SHA1 for Rust. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Minimal implementation of SHA1 for Rust. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,upload-docs.sh} + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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 "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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 "std" feature of "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -56,13 +98,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,upload-docs.sh} - %changelog +* Fri Nov 02 2018 Igor Gnatenko - 0.6.0-4 +- Adapt to new packaging + * Sat Jul 28 2018 Igor Gnatenko - 0.6.0-3 - Rebuild to trigger tests