From 0a2522ff38379f5292b5a1f7dd2fcb98d5fc93d3 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 9 Mar 2019 15:33:03 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-termion.spec | 46 ++++++++++++------- ...metadata.diff => termion-fix-metadata.diff | 2 +- tests/.fmf/version | 1 + tests/provision.fmf | 5 ++ tests/tests.yml | 13 ++++++ 5 files changed, 49 insertions(+), 18 deletions(-) rename termion-1.5.1-fix-metadata.diff => termion-fix-metadata.diff (79%) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/rust-termion.spec b/rust-termion.spec index 74886d8..74b1cdf 100644 --- a/rust-termion.spec +++ b/rust-termion.spec @@ -7,37 +7,55 @@ Name: rust-%{crate} Version: 1.5.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Bindless library for manipulating terminals License: MIT URL: https://crates.io/crates/termion -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # Initial patched metadata # * No redox -Patch0: termion-1.5.1-fix-metadata.diff +Patch0: termion-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.8 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.8 with crate(libc/default) < 0.3.0) -%description -%{summary}. +%global _description \ +A bindless library for manipulating terminals. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A bindless library for manipulating terminals. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/logo.svg + +%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 %{crate} from crates.io. +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 @@ -51,12 +69,6 @@ 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}/logo.svg - %changelog * Sat Feb 02 2019 Fedora Release Engineering - 1.5.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/termion-1.5.1-fix-metadata.diff b/termion-fix-metadata.diff similarity index 79% rename from termion-1.5.1-fix-metadata.diff rename to termion-fix-metadata.diff index 4065b11..7f09aff 100644 --- a/termion-1.5.1-fix-metadata.diff +++ b/termion-fix-metadata.diff @@ -1,5 +1,5 @@ --- termion-1.5.1/Cargo.toml 2017-08-04T00:12:31+02:00 -+++ termion-1.5.1/Cargo.toml 2017-11-19T10:22:50.337549+01:00 ++++ termion-1.5.1/Cargo.toml 2019-03-09T15:32:09.243636+01:00 @@ -11,7 +11,3 @@ [target.'cfg(not(target_os = "redox"))'.dependencies] diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..c4d8ae0 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-termion