From 71d3b1c3e3053ab3b6fc1a60fbcff8d0854882f9 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 4 Feb 2019 10:04:14 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- libm-fix-metadata.diff | 2 +- rust-libm.spec | 45 +++++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/libm-fix-metadata.diff b/libm-fix-metadata.diff index 9cba508..06b7913 100644 --- a/libm-fix-metadata.diff +++ b/libm-fix-metadata.diff @@ -1,5 +1,5 @@ --- libm-0.1.2/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ libm-0.1.2/Cargo.toml 2018-09-10T11:04:32.801965+02:00 ++++ libm-0.1.2/Cargo.toml 2019-02-04T10:03:29.520964+01:00 @@ -20,3 +20,4 @@ categories = ["no-std"] license = "MIT OR Apache-2.0" diff --git a/rust-libm.spec b/rust-libm.spec index fabbc6e..13f05ca 100644 --- a/rust-libm.spec +++ b/rust-libm.spec @@ -1,18 +1,19 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate libm Name: rust-%{crate} Version: 0.1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: libm in pure Rust # Upstream license specification: MIT OR Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/libm -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # Initial patched metadata # * Exclude ci/, https://github.com/japaric/libm/pull/148 Patch0: libm-fix-metadata.diff @@ -21,21 +22,39 @@ ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -%description -%{summary}. +%global _description \ +libm in pure Rust. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -libm in pure 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-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 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -49,12 +68,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 +* Mon Feb 04 2019 Igor Gnatenko - 0.1.2-3 +- Adapt for new packaging + * Sat Feb 02 2019 Fedora Release Engineering - 0.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild