diff --git a/ansi_colours-fix-metadata.diff b/ansi_colours-fix-metadata.diff index 37ecd28..556ae95 100644 --- a/ansi_colours-fix-metadata.diff +++ b/ansi_colours-fix-metadata.diff @@ -1,5 +1,5 @@ --- ansi_colours-1.0.1/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ ansi_colours-1.0.1/Cargo.toml 2018-10-04T15:07:13.623734+02:00 ++++ ansi_colours-1.0.1/Cargo.toml 2018-11-03T13:16:20.976374+01:00 @@ -29,7 +29,7 @@ version = "^0.2" diff --git a/rust-ansi_colours.spec b/rust-ansi_colours.spec index e11c8eb..e2829d7 100644 --- a/rust-ansi_colours.spec +++ b/rust-ansi_colours.spec @@ -1,14 +1,16 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate ansi_colours Name: rust-%{crate} Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: true-colour ↔ ANSI terminal palette converter +# FIXME: Upstream uses unknown SPDX tag LGPL-3.0-or-later! License: LGPLv3+ URL: https://crates.io/crates/ansi_colours Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate @@ -19,26 +21,42 @@ Patch0: ansi_colours-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [build-dependencies] -BuildRequires: (crate(cc) >= 1.0.0 with crate(cc) < 2.0.0) +BuildRequires: (crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(delta_e) >= 0.2.0 with crate(delta_e) < 0.3.0) -BuildRequires: (crate(lab) >= 0.6.0 with crate(lab) < 0.7.0) +BuildRequires: (crate(delta_e/default) >= 0.2.0 with crate(delta_e/default) < 0.3.0) +BuildRequires: (crate(lab/default) >= 0.6.0 with crate(lab/default) < 0.7.0) %endif -%description -%{summary}. +%global _description \ +true-colour ↔ ANSI terminal palette converter. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -true-colour ↔ ANSI terminal palette converter. +%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}/ + +%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 @@ -55,11 +73,9 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sat Nov 03 2018 Igor Gnatenko - 1.0.1-2 +- Adapt to new packaging + * Thu Oct 04 2018 Igor Gnatenko - 1.0.1-1 - Initial package 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..1bc6fd0 --- /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-ansi_colours