diff --git a/rust-unicode-bidi.spec b/rust-unicode-bidi.spec index b2c9cb6..da205fa 100644 --- a/rust-unicode-bidi.spec +++ b/rust-unicode-bidi.spec @@ -1,44 +1,99 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate unicode-bidi Name: rust-%{crate} Version: 0.3.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Implementation of the Unicode Bidirectional Algorithm +# Upstream license specification: MIT / Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/unicode-bidi Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Flamer is nightly -Patch0: unicode-bidi-0.3.4-fix-metadata.diff +Patch0: unicode-bidi-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(matches) >= 0.1.0 with crate(matches) < 0.2.0) -BuildRequires: ((crate(serde) >= 0.8.0 with crate(serde) < 2.0.0) with crate(serde/derive)) +BuildRequires: (crate(matches/default) >= 0.1.0 with crate(matches/default) < 0.2.0) +BuildRequires: (crate(serde/default) >= 0.8.0 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde/derive) >= 0.8.0 with crate(serde/derive) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(serde_test) >= 0.8.0 with crate(serde_test) < 2.0.0) +BuildRequires: (crate(serde_test/default) >= 0.8.0 with crate(serde_test/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +Implementation of the Unicode Bidirectional Algorithm. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Implementation of the Unicode Bidirectional Algorithm. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license COPYRIGHT LICENSE-MIT LICENSE-APACHE +%doc README.md AUTHORS +%{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 + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+unstable-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unstable-devel %{_description} + +This package contains library source intended for building other packages +which use "unstable" feature of "%{crate}" crate. + +%files -n %{name}+unstable-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+with_serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+with_serde-devel %{_description} + +This package contains library source intended for building other packages +which use "with_serde" feature of "%{crate}" crate. + +%files -n %{name}+with_serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -56,12 +111,10 @@ which use %{crate} from crates.io. %cargo_test -- --doc %endif -%files devel -%license COPYRIGHT LICENSE-MIT LICENSE-APACHE -%doc README.md AUTHORS -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sat Nov 03 2018 Igor Gnatenko - 0.3.4-6 +- Adapt to new packaging + * Sat Jul 14 2018 Fedora Release Engineering - 0.3.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild 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..a6e2b9b --- /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-unicode-bidi diff --git a/unicode-bidi-0.3.4-fix-metadata.diff b/unicode-bidi-fix-metadata.diff similarity index 74% rename from unicode-bidi-0.3.4-fix-metadata.diff rename to unicode-bidi-fix-metadata.diff index 9ee9a67..859b8a0 100644 --- a/unicode-bidi-0.3.4-fix-metadata.diff +++ b/unicode-bidi-fix-metadata.diff @@ -1,6 +1,6 @@ --- unicode-bidi-0.3.4/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ unicode-bidi-0.3.4/Cargo.toml 2017-11-10T10:21:03.902269+01:00 -@@ -23,13 +23,6 @@ ++++ unicode-bidi-0.3.4/Cargo.toml 2018-11-03T14:41:00.278011+01:00 +@@ -23,14 +23,6 @@ [lib] name = "unicode_bidi" @@ -11,10 +11,11 @@ -[dependencies.flamer] -version = "0.1" -optional = true - +- [dependencies.serde] version = ">=0.8, <2.0" -@@ -43,7 +36,6 @@ + features = ["derive"] +@@ -43,7 +35,6 @@ [features] with_serde = ["serde"]