You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-rustfix/rust-rustfix.spec

77 lines
2.2 KiB

# Generated by rust2rpm
# * Tests are run in infrastructure
%bcond_with check
%global debug_package %{nil}
%global crate rustfix
Name: rust-%{crate}
Version: 0.4.2
Release: 1%{?dist}
Summary: Automatically apply the suggestions made by rustc
# Upstream license specification: Apache-2.0/MIT
License: ASL 2.0 or MIT
URL: https://crates.io/crates/rustfix
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Use released version of env_logger
Patch0: rustfix-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(failure) >= 0.1.1 with crate(failure) < 0.2.0)
BuildRequires: (crate(log) >= 0.4.1 with crate(log) < 0.5.0)
BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0)
BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0)
BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0)
%if %{with check}
# [dev-dependencies]
BuildRequires: (crate(difference) >= 2.0.0 with crate(difference) < 3.0.0)
BuildRequires: (crate(duct) >= 0.9.0 with crate(duct) < 0.10.0)
BuildRequires: (crate(env_logger) >= 0.5.0 with crate(env_logger) < 0.6.0)
BuildRequires: (crate(log) >= 0.4.1 with crate(log) < 0.5.0)
BuildRequires: (crate(proptest) >= 0.7.0 with crate(proptest) < 0.8.0)
BuildRequires: (crate(tempdir) >= 0.3.5 with crate(tempdir) < 0.4.0)
%endif
%description
%{summary}.
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
Automatically apply the suggestions made by rustc.
This package contains library source intended for building other packages
which use %{crate} from crates.io.
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc Readme.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/bors.toml
%changelog
* Sun Oct 21 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.2-1
- Initial package