Adapt to new packaging

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

@ -7,9 +7,10 @@
Name: rust-%{crate}
Version: 1.5.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Enum `Either` is a general purpose sum type with two cases
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/either
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
@ -17,30 +18,64 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: ((crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) with crate(serde/derive))
BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires: (crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0)
%description
%{summary}.
%global _description \
The enum `Either` with variants `Left` and `Right` is a general purpose sum\
type with two cases.
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
The enum `Either` with variants `Left` and `Right` is a general purpose
sum type with two cases.
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.rst README-crates.io.md
%{cargo_registry}/%{crate}-%{version}/
Either has methods that are similar to Option and Result, and it also implements
traits like `Iterator`.
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
Includes macros `try_left!()` and `try_right!()` to use for
short-circuiting logic, similar to how the `?` operator is used with `Result`.
Note that `Either` is general purpose. For describing success or error, use the
regular `Result`.
%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
%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
%package -n %{name}+use_std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+use_std-devel %{_description}
This package contains library source intended for building other packages
which use "use_std" feature of "%{crate}" crate.
%files -n %{name}+use_std-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
@ -57,12 +92,10 @@ which use %{crate} from crates.io.
%cargo_test
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.rst README-crates.io.md
%{cargo_registry}/%{crate}-%{version}/
%changelog
* Sun Oct 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.0-4
- Adapt to new packaging
* Sun Oct 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.0-3
- Run tests in infrastructure

Loading…
Cancel
Save