From e8f8f030739eca3fd526c8d92d670f77f03e0576 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Feb 24 2019 13:47:11 +0000 Subject: Adapt to new packaging Signed-off-by: Igor Gnatenko --- diff --git a/rust-decimal.spec b/rust-decimal.spec index 06520b8..fb8a9b3 100644 --- a/rust-decimal.spec +++ b/rust-decimal.spec @@ -1,49 +1,101 @@ # Generated by rust2rpm -%bcond_without check +%bcond_with check %global debug_package %{nil} %global crate decimal Name: rust-%{crate} Version: 2.0.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Decimal floating point arithmetic for Rust # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: https://crates.io/crates/decimal -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # https://github.com/alkis/decimal/commit/5577a60b9b8860a322288856ff2419c191ed080f Patch0001: 0001-allow-build-on-aarch64-42.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(bitflags) >= 1.0.0 with crate(bitflags) < 2.0.0) -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -BuildRequires: (crate(ord_subset) >= 3.0.0 with crate(ord_subset) < 4.0.0) -BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0) -BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) -# [build-dependencies] -BuildRequires: (crate(cc) >= 1.0.0 with crate(cc) < 2.0.0) +BuildRequires: (crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0) +BuildRequires: (crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(ord_subset/default) >= 3.0.0 with crate(ord_subset/default) < 4.0.0) +BuildRequires: (crate(rustc-serialize/default) >= 0.3.0 with crate(rustc-serialize/default) < 0.4.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +Decimal floating point arithmetic for Rust. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Decimal floating point arithmetic for Rust. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{_bindir}/run-test + +%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}+ord_subset-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+ord_subset-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "ord_subset" feature of "%{crate}" crate. + +%files -n %{name}+ord_subset-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+rustc-serialize-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rustc-serialize-devel %{_description} + +This package contains library source intended for building other packages +which use "rustc-serialize" feature of "%{crate}" crate. + +%files -n %{name}+rustc-serialize-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 "serde" feature of "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -N @@ -62,13 +114,10 @@ find -type f -exec sed -i -e "s/\r//" {} \+ %cargo_test %endif -%files devel -%license LICENSE -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{_bindir}/run-test - %changelog +* Sun Feb 24 2019 Igor Gnatenko - 2.0.4-3 +- Adapt to new packaging + * Sat Feb 02 2019 Fedora Release Engineering - 2.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_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..6219067 --- /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-decimal