Adapt to new packaging

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

@ -1,5 +1,5 @@
# Generated by rust2rpm # Generated by rust2rpm
# Tests are run in infrastructure # * Tests are run in infrastructure
%bcond_with check %bcond_with check
%global debug_package %{nil} %global debug_package %{nil}
@ -7,9 +7,10 @@
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.6.0 Version: 0.6.0
Release: 3%{?dist} Release: 4%{?dist}
Summary: Minimal implementation of SHA1 for Rust Summary: Minimal implementation of SHA1 for Rust
# Upstream license specification: BSD-3-Clause
License: BSD License: BSD
URL: https://crates.io/crates/sha1 URL: https://crates.io/crates/sha1
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
@ -19,27 +20,68 @@ Patch0001: 0001-guard-hexdigest-doctest-by-cfg-feature-std.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging BuildRequires: rust-packaging
# [dependencies] BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0)
%if %{with check} %if %{with check}
# [dev-dependencies] BuildRequires: (crate(openssl/default) >= 0.10.0 with crate(openssl/default) < 0.11.0)
BuildRequires: (crate(openssl) >= 0.10.0 with crate(openssl) < 0.11.0) BuildRequires: (crate(rand/default) >= 0.4.0 with crate(rand/default) < 0.5.0)
BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0)
BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0)
%endif %endif
%description %global _description \
%{summary}. Minimal implementation of SHA1 for Rust.
%description %{_description}
%package devel %package devel
Summary: %{summary} Summary: %{summary}
BuildArch: noarch BuildArch: noarch
%description devel %description devel %{_description}
Minimal implementation of SHA1 for Rust.
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 "%{crate}" crate.
%files devel
%license LICENSE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,upload-docs.sh}
%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 "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 %prep
%autosetup -n %{crate}-%{version} -p1 %autosetup -n %{crate}-%{version} -p1
@ -56,13 +98,10 @@ which use %{crate} from crates.io.
%cargo_test %cargo_test
%endif %endif
%files devel
%license LICENSE
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,upload-docs.sh}
%changelog %changelog
* Fri Nov 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.0-4
- Adapt to new packaging
* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.0-3 * Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.0-3
- Rebuild to trigger tests - Rebuild to trigger tests

Loading…
Cancel
Save