From ac26eb2fbd95334a8310a4fad799ca9044bc12c1 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 11:55:34 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- ...ix-metadata.diff => atty-fix-metadata.diff | 5 ++- rust-atty.spec | 45 ++++++++++++------- 2 files changed, 33 insertions(+), 17 deletions(-) rename atty-0.2.11-fix-metadata.diff => atty-fix-metadata.diff (80%) diff --git a/atty-0.2.11-fix-metadata.diff b/atty-fix-metadata.diff similarity index 80% rename from atty-0.2.11-fix-metadata.diff rename to atty-fix-metadata.diff index 09c914e..8e0ac1c 100644 --- a/atty-0.2.11-fix-metadata.diff +++ b/atty-fix-metadata.diff @@ -1,11 +1,12 @@ --- atty-0.2.11/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ atty-0.2.11/Cargo.toml 2018-07-23T08:13:02.704915+02:00 -@@ -21,13 +21,8 @@ ++++ atty-0.2.11/Cargo.toml 2018-10-27T11:54:14.799204+02:00 +@@ -21,13 +21,9 @@ keywords = ["terminal", "tty"] license = "MIT" repository = "https://github.com/softprops/atty" -[target."cfg(target_os = \"redox\")".dependencies.termion] -version = "1.5" ++exclude = ["/.travis.yml", "/appveyor.yml"] [target."cfg(unix)".dependencies.libc] version = "0.2" default-features = false diff --git a/rust-atty.spec b/rust-atty.spec index 89b7198..d960e17 100644 --- a/rust-atty.spec +++ b/rust-atty.spec @@ -1,5 +1,5 @@ # Generated by rust2rpm -# Checks are pretty much useless, because they rely on tty +# * Checks are pretty much useless, because they rely on tty %bcond_with check %global debug_package %{nil} @@ -7,7 +7,7 @@ Name: rust-%{crate} Version: 0.2.11 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Simple interface for querying atty License: MIT @@ -15,26 +15,44 @@ URL: https://crates.io/crates/atty Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No windows/redox -Patch0: atty-0.2.11-fix-metadata.diff +# * Exclude CI files, https://github.com/softprops/atty/pull/32 +Patch0: atty-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -%description -%{summary}. +%global _description \ +A simple interface for querying atty. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A simple interface for querying atty. +%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 CHANGELOG.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 @@ -51,13 +69,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 0.2.11-3 +- Adapt to new packaging + * Sat Jul 28 2018 Igor Gnatenko - 0.2.11-2 - Rebuild to trigger tests