Blob Blame History Raw
# Generated by rust2rpm
%bcond_without check
%global debug_package %{nil}

%global crate rustc-test

Name:           rust-%{crate}
Version:        0.2.0
Release:        1%{?dist}
Summary:        Fork of Rust’s `test` crate that doesn’t require unstable language features

# https://github.com/servo/rustc-test/issues/5
License:        MIT or ASL 2.0
URL:            https://crates.io/crates/rustc-test
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0)
BuildRequires:  (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0)
BuildRequires:  (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0)
BuildRequires:  (crate(term) >= 0.4.0 with crate(term) < 0.5.0)
BuildRequires:  (crate(time) >= 0.1.0 with crate(time) < 0.2.0)
# [build-dependencies]
BuildRequires:  (crate(rustc_version) >= 0.2.1 with crate(rustc_version) < 0.3.0)

%description
%{summary}.

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel
A fork of Rust’s `test` crate that doesn’t require unstable language features.

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
%{cargo_registry}/%{crate}-%{version}/

%changelog
* Wed Jul 05 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.0-1
- Initial package