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-1.5.1-fix-metadata.diff deleted file mode 100644 index 4065b11..0000000 --- a/termion-1.5.1-fix-metadata.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- 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 -@@ -11,7 +11,3 @@ - - [target.'cfg(not(target_os = "redox"))'.dependencies] - libc = "0.2.8" -- --[target.'cfg(target_os = "redox")'.dependencies] --redox_syscall = "0.1" --redox_termios = "0.1" diff --git a/termion-fix-metadata.diff b/termion-fix-metadata.diff new file mode 100644 index 0000000..7f09aff --- /dev/null +++ b/termion-fix-metadata.diff @@ -0,0 +1,10 @@ +--- termion-1.5.1/Cargo.toml 2017-08-04T00:12:31+02: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] + libc = "0.2.8" +- +-[target.'cfg(target_os = "redox")'.dependencies] +-redox_syscall = "0.1" +-redox_termios = "0.1" 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