diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/0001-Loosen-parking_lot-dependency-constraints.patch b/0001-Loosen-parking_lot-dependency-constraints.patch new file mode 100644 index 0000000..9460b2a --- /dev/null +++ b/0001-Loosen-parking_lot-dependency-constraints.patch @@ -0,0 +1,29 @@ +From 32cd3651571477dd263f454da19123a0db89ceab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= +Date: Thu, 7 Feb 2019 17:00:34 +0100 +Subject: [PATCH] Loosen parking_lot dependency constraints +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jan Staněk +--- + Cargo.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Cargo.toml b/Cargo.toml +index b26e4ce..4d44080 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -23,7 +23,7 @@ categories = ["rust-patterns", "memory-management"] + license = "MIT OR Apache-2.0" + repository = "https://github.com/matklad/once_cell" + [dependencies.parking_lot] +-version = "0.7.1" ++version = ">=0.6.4,<0.8.0" + optional = true + default_features = false + [dev-dependencies.crossbeam-utils] +-- +2.20.1 + diff --git a/0002-Exclude-unnecessary-files.patch b/0002-Exclude-unnecessary-files.patch new file mode 100644 index 0000000..374bccd --- /dev/null +++ b/0002-Exclude-unnecessary-files.patch @@ -0,0 +1,26 @@ +From 5bec30616b685f4b0dea254ea149dd352c6ad097 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 8 Feb 2019 16:19:26 +0100 +Subject: [PATCH 2/2] Exclude unnecessary files + +Signed-off-by: rpm-build +--- + Cargo.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 4d44080..7168f37 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -14,7 +14,7 @@ + name = "once_cell" + version = "0.1.8" + authors = ["Aleksey Kladov "] +-exclude = ["*.png", "*.svg"] ++exclude = ["*.png", "*.svg", "/.travis.yml", "/examples/*", "/Cargo.lock.min"] + description = "Single assignment cells and lazy static values without macros." + documentation = "https://docs.rs/once_cell" + readme = "README.md" +-- +2.20.1 + diff --git a/once_cell-0.1.8.crate b/once_cell-0.1.8.crate new file mode 100644 index 0000000..5e0526a Binary files /dev/null and b/once_cell-0.1.8.crate differ diff --git a/rust-once_cell.spec b/rust-once_cell.spec new file mode 100644 index 0000000..fced00c --- /dev/null +++ b/rust-once_cell.spec @@ -0,0 +1,66 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate once_cell + +Name: rust-%{crate} +Version: 0.1.8 +Release: 1%{?dist} +Summary: Single assignment cells and lazy static values without macros + +# Upstream license specification: MIT OR Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/once_cell +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate + +# Allow F29 builds +Patch0: 0001-Loosen-parking_lot-dependency-constraints.patch +Patch1: 0002-Exclude-unnecessary-files.patch + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(parking_lot) >= 0.6.4 with crate(parking_lot) < 0.8.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(crossbeam-utils/default) >= 0.6.0 with crate(crossbeam-utils/default) < 0.7.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Single assignment cells and lazy static values without macros. + +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-APACHE LICENSE-MIT +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Thu Feb 07 2019 Jan Stanek - 0.1.8-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29