From 05e0ba9d4f19ce400d6877055fa5608ad911f4bb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 17 Jan 2019 12:42:41 -0800 Subject: [PATCH] Initial package --- .gitignore | 1 + hashbrown-fix-metadata.diff | 11 ++++ rust-hashbrown.spec | 108 ++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 121 insertions(+) create mode 100644 .gitignore create mode 100644 hashbrown-fix-metadata.diff create mode 100644 rust-hashbrown.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..efe0f5d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/hashbrown-0.1.8.crate diff --git a/hashbrown-fix-metadata.diff b/hashbrown-fix-metadata.diff new file mode 100644 index 0000000..7d2e9e7 --- /dev/null +++ b/hashbrown-fix-metadata.diff @@ -0,0 +1,11 @@ +--- hashbrown-0.1.8/Cargo.toml 1969-12-31T16:00:00-08:00 ++++ hashbrown-0.1.8/Cargo.toml 2019-01-17T12:38:35.191437-08:00 +@@ -20,6 +20,8 @@ + categories = ["data-structures", "no-std"] + license = "Apache-2.0/MIT" + repository = "https://github.com/Amanieu/hashbrown" ++exclude = [".travis.yml", "bors.toml"] ++ + [dependencies.byteorder] + version = "1.0" + default-features = false diff --git a/rust-hashbrown.spec b/rust-hashbrown.spec new file mode 100644 index 0000000..8a74589 --- /dev/null +++ b/rust-hashbrown.spec @@ -0,0 +1,108 @@ +# Generated by rust2rpm +# rustc-hash is not packaged +%bcond_with check +%global debug_package %{nil} + +%global crate hashbrown + +Name: rust-%{crate} +Version: 0.1.8 +Release: 1%{?dist} +Summary: Rust port of Google's SwissTable hash map + +# Upstream license specification: Apache-2.0/MIT +License: ASL 2.0 or MIT +URL: https://crates.io/crates/hashbrown +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * exclude CI files +Patch0: hashbrown-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0) +BuildRequires: (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0) +BuildRequires: (crate(scopeguard) >= 0.3.0 with crate(scopeguard) < 0.4.0) +BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) +%if %{with check} +BuildRequires: (crate(lazy_static/default) >= 1.2.0 with crate(lazy_static/default) < 1.3.0) +BuildRequires: (crate(rand/default) >= 0.5.1 with crate(rand/default) < 0.6.0) +BuildRequires: (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0) +BuildRequires: (crate(rustc-hash/default) >= 1.0.0 with crate(rustc-hash/default) < 2.0.0) +BuildRequires: (crate(serde_test/default) >= 1.0.0 with crate(serde_test/default) < 2.0.0) +%endif + +%global _description \ +A Rust port of Google's SwissTable hash map. + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-APACHE LICENSE-MIT +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%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}+rayon-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rayon-devel %{_description} + +This package contains library source intended for building other packages +which use "rayon" feature of "%{crate}" crate. + +%files -n %{name}+rayon-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 + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Mon Jan 14 2019 Josh Stone - 0.1.8-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..219b5bd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (hashbrown-0.1.8.crate) = 297fc503bd716faaf6dbb76211522e792688828f7032c9045a298f85e8777fafa233d51632b7e204d07292b3478e8b69f1cb697192033dfc91b079de7f230032