From 54a3646595ccb45c6a04c0e3fec41ad14402d631 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 01:36:55 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-num_cpus.spec | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/rust-num_cpus.spec b/rust-num_cpus.spec index 5a718f4..3373422 100644 --- a/rust-num_cpus.spec +++ b/rust-num_cpus.spec @@ -7,9 +7,10 @@ Name: rust-%{crate} Version: 1.8.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Get the number of CPUs on a machine +# Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/num_cpus Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate @@ -17,21 +18,38 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.26 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.26 with crate(libc/default) < 0.3.0) -%description -%{summary}. +%global _description \ +Get the number of CPUs on a machine. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Get the number of CPUs on a machine. +%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-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md CONTRIBUTING.md +%{cargo_registry}/%{crate}-%{version}/ + +%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 %prep %autosetup -n %{crate}-%{version} -p1 @@ -48,12 +66,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md CHANGELOG.md CONTRIBUTING.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Fri Oct 26 2018 Igor Gnatenko - 1.8.0-6 +- Adapt to new packaging + * Sun Oct 07 2018 Igor Gnatenko - 1.8.0-5 - Run tests in infrastructure