From d387eea4393bc51a3214015e03624769ee3027f0 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 3 Dec 2017 18:46:31 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + nix-0.9.0-fix-metadata.diff | 16 ++++++++ rust-nix.spec | 74 +++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 92 insertions(+) create mode 100644 .gitignore create mode 100644 nix-0.9.0-fix-metadata.diff create mode 100644 rust-nix.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53dc300 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/nix-0.9.0.crate diff --git a/nix-0.9.0-fix-metadata.diff b/nix-0.9.0-fix-metadata.diff new file mode 100644 index 0000000..1f013f2 --- /dev/null +++ b/nix-0.9.0-fix-metadata.diff @@ -0,0 +1,16 @@ +--- nix-0.9.0/Cargo.toml 2017-07-24T05:08:20+02:00 ++++ nix-0.9.0/Cargo.toml 2017-12-03T13:11:09.785178+01:00 +@@ -21,11 +21,11 @@ + void = "1.0.2" + + [dev-dependencies] +-lazy_static = "0.2" ++lazy_static = "1" + rand = "0.3.8" + tempdir = "0.3" + tempfile = "2" +-nix-test = { path = "nix-test", version = "0.0.1" } ++nix-test = { version = "0.0.1" } + + [[test]] + name = "test" diff --git a/rust-nix.spec b/rust-nix.spec new file mode 100644 index 0000000..d46df41 --- /dev/null +++ b/rust-nix.spec @@ -0,0 +1,74 @@ +# Generated by rust2rpm +# * nix-test is nightly +%bcond_with check +%global debug_package %{nil} + +%global crate nix + +Name: rust-%{crate} +Version: 0.9.0 +Release: 1%{?dist} +Summary: Rust friendly bindings to *nix APIs + +License: MIT +URL: https://crates.io/crates/nix +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No paths +# * Bump lazy_static to 1, https://github.com/nix-rust/nix/commit/dcd190a93cda47c525c6c51cc0159699333310fd +Patch0: nix-0.9.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(bitflags) >= 0.9.0 with crate(bitflags) < 0.10.0) +BuildRequires: (crate(cfg-if) >= 0.1.0 with crate(cfg-if) < 0.2.0) +BuildRequires: (crate(libc) >= 0.2.25 with crate(libc) < 0.3.0) +BuildRequires: (crate(void) >= 1.0.2 with crate(void) < 2.0.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) +BuildRequires: (crate(nix-test) >= 0.0.1 with crate(nix-test) < 0.0.2) +BuildRequires: (crate(rand) >= 0.3.8 with crate(rand) < 0.4.0) +BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) +BuildRequires: (crate(tempfile) >= 2.0.0 with crate(tempfile) < 3.0.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Rust friendly bindings to *nix APIs. + +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 +%doc CHANGELOG.md CONTRIBUTING.md CONVENTIONS.md README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/{Cross.toml,RELEASE_PROCEDURE.md,bors.toml} + +%changelog +* Sun Dec 03 2017 Igor Gnatenko - 0.9.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..5761e5c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (nix-0.9.0.crate) = e9a2ef99c63cfa8d818ca5c41d8cb1472494fac60f86bda0c7646c5835a2c1ee92c10840c8c8da28044215bfc06b97881f57f602e8da5a55daad146b8bc10988