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

%global crate lru_time_cache

Name:           rust-%{crate}
Version:        0.8.0
Release:        1%{?dist}
Summary:        Implementation of a Least Recently Used caching algorithm

License:        GPLv3+
URL:            https://crates.io/crates/lru_time_cache
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump deps to latest versions, https://github.com/maidsafe/lru_time_cache/pull/106
Patch0:         lru_time_cache-0.8.0-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(fake_clock) >= 0.3.0 with crate(fake_clock) < 0.4.0)
%if %{with check}
# [dev-dependencies]
BuildRequires:  (crate(rand) >= 0.4.1 with crate(rand) < 0.5.0)
%endif

%description
%{summary}.

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

%description    devel
Implementation of a Least Recently Used caching algorithm in a container which
may be limited by size or time, ordered by most recently seen.

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 COPYING LICENSE
%doc README.md CHANGELOG.md CONTRIBUTOR
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml

%changelog
* Fri Jul 06 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-1
- Initial package