From 2157e5cd21dd88b23bd9ff5a90c5366c04cce5ca Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 20 Nov 2017 15:18:03 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + nom-3.2.1-fix-metadata.diff | 24 ++++++++++++++ rust-nom.spec | 64 +++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 90 insertions(+) create mode 100644 .gitignore create mode 100644 nom-3.2.1-fix-metadata.diff create mode 100644 rust-nom.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..33a2347 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/nom-3.2.1.crate diff --git a/nom-3.2.1-fix-metadata.diff b/nom-3.2.1-fix-metadata.diff new file mode 100644 index 0000000..f42018d --- /dev/null +++ b/nom-3.2.1-fix-metadata.diff @@ -0,0 +1,24 @@ +--- nom-3.2.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ nom-3.2.1/Cargo.toml 2017-11-18T08:44:01.011668+01:00 +@@ -23,12 +23,8 @@ + license = "MIT" + repository = "https://github.com/Geal/nom" + [dependencies.memchr] +-version = "^1.0.1" ++version = "^2" + default-features = false +- +-[dependencies.compiler_error] +-version = "0.1.1" +-optional = true + + [dependencies.regex] + version = "^0.2" +@@ -43,7 +39,6 @@ + regexp = ["regex"] + verbose-errors = [] + stream = [] +-nightly = ["compiler_error"] + regexp_macros = ["regexp", "lazy_static"] + std = ["memchr/use_std"] + [badges.travis-ci] diff --git a/rust-nom.spec b/rust-nom.spec new file mode 100644 index 0000000..8f98469 --- /dev/null +++ b/rust-nom.spec @@ -0,0 +1,64 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate nom + +Name: rust-%{crate} +Version: 3.2.1 +Release: 1%{?dist} +Summary: Byte-oriented, zero-copy, parser combinators library + +License: MIT +URL: https://crates.io/crates/nom +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +Patch0: nom-3.2.1-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(lazy_static) >= 0.2.2 with crate(lazy_static) < 0.3.0) +BuildRequires: (crate(memchr) >= 2.0.0 with crate(memchr) < 3.0.0) +BuildRequires: (crate(regex) >= 0.2.0 with crate(regex) < 0.3.0) + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +A byte-oriented, zero-copy, parser combinators library. + +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 +# https://github.com/Geal/nom/issues/609 +sed -i -e "/fn seeking_consumer/i #[ignore]" src/stream.rs +rm -vf tests/mp4.rs +%cargo_test +%endif + +%files devel +%license LICENSE +%doc CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Sat Nov 18 2017 Igor Gnatenko - 3.2.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..992161e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (nom-3.2.1.crate) = 2baf05e568c426eaa1560569538e0f08706e40333a797374bd3f897bcadfcf239c6dc9eaabb99e9ac72d8b79e46f12ade8b5d88b04ce10ef24e8b21513392c77