Adapt to new packaging

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 6 years ago
parent bdd43a77b6
commit bb6572d1c0
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -1,5 +1,5 @@
--- datetime-0.4.7/Cargo.toml 1970-01-01T01:00:00+01:00 --- datetime-0.4.7/Cargo.toml 1970-01-01T01:00:00+01:00
+++ datetime-0.4.7/Cargo.toml 2017-11-21T07:27:20.696471+01:00 +++ datetime-0.4.7/Cargo.toml 2018-11-14T12:29:53.775863+01:00
@@ -29,22 +29,13 @@ @@ -29,22 +29,13 @@
version = "0.2" version = "0.2"

@ -1,5 +1,6 @@
# Generated by rust2rpm # Generated by rust2rpm
%bcond_without check # * Tests are run in infrastructure
%bcond_with check
%global debug_package %{nil} %global debug_package %{nil}
%global crate datetime %global crate datetime
@ -18,36 +19,52 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{
# * No redox # * No redox
# * Drop regex dependency, https://github.com/rust-datetime/datetime/pull/19 # * Drop regex dependency, https://github.com/rust-datetime/datetime/pull/19
# * Bump iso8601 to 0.2, https://github.com/rust-datetime/datetime/pull/21 # * Bump iso8601 to 0.2, https://github.com/rust-datetime/datetime/pull/21
Patch0: datetime-0.4.7-fix-metadata.diff Patch0: datetime-fix-metadata.diff
# Really drop regex dependency # Really drop regex dependency
Patch1: 0001-drop-regex-from-dependency-set.patch Patch1: 0001-drop-regex-from-dependency-set.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging BuildRequires: rust-packaging
# [dependencies] BuildRequires: (crate(iso8601/default) >= 0.2.0 with crate(iso8601/default) < 0.3.0)
BuildRequires: (crate(iso8601) >= 0.2.0 with crate(iso8601) < 0.3.0) BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) BuildRequires: (crate(locale/default) >= 0.2.0 with crate(locale/default) < 0.3.0)
BuildRequires: (crate(locale) >= 0.2.0 with crate(locale) < 0.3.0) BuildRequires: (crate(num-traits/default) >= 0.1.35 with crate(num-traits/default) < 0.2.0)
BuildRequires: (crate(num-traits) >= 0.1.35 with crate(num-traits) < 0.2.0) BuildRequires: (crate(pad/default) >= 0.1.0 with crate(pad/default) < 0.2.0)
BuildRequires: (crate(pad) >= 0.1.0 with crate(pad) < 0.2.0)
%if %{with check} %if %{with check}
# [dev-dependencies] BuildRequires: (crate(rustc-serialize/default) >= 0.3.0 with crate(rustc-serialize/default) < 0.4.0)
BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0)
%endif %endif
%description %global _description \
%{summary}. Library for date and time formatting and arithmetic.
%description %{_description}
%package devel %package devel
Summary: %{summary} Summary: %{summary}
BuildArch: noarch BuildArch: noarch
%description devel %description devel %{_description}
Library for date and time formatting and arithmetic.
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/tests/generate_tests.rb
%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 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 %prep
%autosetup -n %{crate}-%{version} -p1 %autosetup -n %{crate}-%{version} -p1
@ -64,11 +81,6 @@ which use %{crate} from crates.io.
%cargo_test %cargo_test
%endif %endif
%files devel
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/tests/generate_tests.rb
%changelog %changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-4 * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
# `cargo test` usually eats more than 1G.
m: 4G

@ -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-datetime
Loading…
Cancel
Save