Adapt to new packaging

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

@ -6,37 +6,133 @@
Name: rust-%{crate}
Version: 0.2.1
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Rational numbers implementation for Rust
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/num-rational
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
Source: %{crates_source}
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(num-bigint) >= 0.2.0 with crate(num-bigint) < 0.3.0)
BuildRequires: (crate(num-bigint/std) >= 0.2.0 with crate(num-bigint/std) < 0.3.0)
BuildRequires: (crate(num-integer) >= 0.1.38 with crate(num-integer) < 0.2.0)
BuildRequires: (crate(num-integer/i128) >= 0.1.38 with crate(num-integer/i128) < 0.2.0)
BuildRequires: (crate(num-integer/std) >= 0.1.38 with crate(num-integer/std) < 0.2.0)
BuildRequires: (crate(num-traits) >= 0.2.4 with crate(num-traits) < 0.3.0)
BuildRequires: (crate(num-traits/i128) >= 0.2.4 with crate(num-traits/i128) < 0.3.0)
BuildRequires: (crate(num-traits/std) >= 0.2.4 with crate(num-traits/std) < 0.3.0)
BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0)
%description
%{summary}.
%global _description \
Rational numbers implementation for Rust.
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
Rational numbers implementation for Rust.
%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.md RELEASES.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{bors.toml,ci}
%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}+bigint-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+bigint-devel %{_description}
This package contains library source intended for building other packages
which use "bigint" feature of "%{crate}" crate.
%files -n %{name}+bigint-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+bigint-std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+bigint-std-devel %{_description}
This package contains library source intended for building other packages
which use "bigint-std" feature of "%{crate}" crate.
%files -n %{name}+bigint-std-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+i128-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+i128-devel %{_description}
This package contains library source intended for building other packages
which use "i128" feature of "%{crate}" crate.
%files -n %{name}+i128-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+num-bigint-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+num-bigint-devel %{_description}
This package contains library source intended for building other packages
which use "num-bigint" feature of "%{crate}" crate.
%files -n %{name}+num-bigint-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}+std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+std-devel %{_description}
This package contains library source intended for building other packages
which use "std" feature of "%{crate}" crate.
%files -n %{name}+std-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%build
@ -50,13 +146,10 @@ which use %{crate} from crates.io.
%cargo_test
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md RELEASES.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{bors.toml,ci}
%changelog
* Sun Feb 10 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.1-5
- Initial package
* Sat Feb 09 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.1-4
- Run tests in infrastructure

Loading…
Cancel
Save