diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c04650a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/lru_time_cache-0.8.0.crate diff --git a/lru_time_cache-0.8.0-fix-metadata.diff b/lru_time_cache-0.8.0-fix-metadata.diff new file mode 100644 index 0000000..c7d09f9 --- /dev/null +++ b/lru_time_cache-0.8.0-fix-metadata.diff @@ -0,0 +1,12 @@ +--- lru_time_cache-0.8.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ lru_time_cache-0.8.0/Cargo.toml 2018-07-06T16:22:16.196218+01:00 +@@ -21,7 +21,7 @@ + license = "GPL-3.0" + repository = "https://github.com/maidsafe/lru_time_cache" + [dependencies.fake_clock] +-version = "~0.2" ++version = "0.3.0" + optional = true + [dev-dependencies.rand] +-version = "~0.4.1" ++version = "0.4.1" diff --git a/rust-lru_time_cache.spec b/rust-lru_time_cache.spec new file mode 100644 index 0000000..1cb503b --- /dev/null +++ b/rust-lru_time_cache.spec @@ -0,0 +1,66 @@ +# 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 - 0.8.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..2f6e4fd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (lru_time_cache-0.8.0.crate) = 88cc4e2195accf5b8e99c2b384ff1d1a2f275cbf0a0372ceed7cfbd8e451cbae6b558fe59416e015474a910e768e0c0f9009c75a37e26b0a3c0cc160811cf00a