From 06b39898c6cf5dff2211c4d921e82d8a2f56c930 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 25 Jan 2021 17:03:31 +0100 Subject: [PATCH] initial import (nom 5 compat package) --- .gitignore | 4 + README.md | 3 - nom-fix-metadata.diff | 75 ++++++++++++++++++ rust-nom5.spec | 175 ++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 255 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 nom-fix-metadata.diff create mode 100644 rust-nom5.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b9281a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/nom-5.1.2.crate diff --git a/README.md b/README.md deleted file mode 100644 index 6c07660..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-nom5 - -The rust-nom5 package diff --git a/nom-fix-metadata.diff b/nom-fix-metadata.diff new file mode 100644 index 0000000..6be5a08 --- /dev/null +++ b/nom-fix-metadata.diff @@ -0,0 +1,75 @@ +--- nom-5.1.2/Cargo.toml 2020-06-12T09:23:25+00:00 ++++ nom-5.1.2/Cargo.toml 2021-01-25T15:53:41.902083+00:00 +@@ -34,21 +34,6 @@ + + [lib] + bench = false +- +-[[example]] +-name = "json" +-path = "examples/json.rs" +-required-features = ["alloc"] +- +-[[example]] +-name = "s_expression" +-path = "examples/s_expression.rs" +-required-features = ["alloc"] +- +-[[example]] +-name = "string" +-path = "examples/string.rs" +-required-features = ["alloc"] + + [[test]] + name = "arithmetic" +@@ -107,35 +92,6 @@ + [[test]] + name = "test1" + +-[[bench]] +-name = "arithmetic" +-path = "benches/arithmetic.rs" +-harness = false +- +-[[bench]] +-name = "http" +-path = "benches/http.rs" +-harness = false +- +-[[bench]] +-name = "ini" +-path = "benches/ini.rs" +-harness = false +- +-[[bench]] +-name = "ini_complete" +-path = "benches/ini_complete.rs" +-harness = false +- +-[[bench]] +-name = "ini_str" +-path = "benches/ini_str.rs" +-harness = false +- +-[[bench]] +-name = "json" +-path = "benches/json.rs" +-harness = false + [dependencies.lazy_static] + version = "^1.0" + optional = true +@@ -151,14 +107,10 @@ + [dependencies.regex] + version = "^1.0" + optional = true +-[dev-dependencies.criterion] +-version = "0.2" + + [dev-dependencies.doc-comment] + version = "0.3" + +-[dev-dependencies.jemallocator] +-version = "^0.1" + [build-dependencies.version_check] + version = "0.9" + diff --git a/rust-nom5.spec b/rust-nom5.spec new file mode 100644 index 0000000..1f302ca --- /dev/null +++ b/rust-nom5.spec @@ -0,0 +1,175 @@ +# Generated by rust2rpm 16 +%bcond_without check +%global debug_package %{nil} + +%global crate nom + +Name: rust-%{crate}5 +Version: 5.1.2 +Release: 1%{?dist} +Summary: Byte-oriented, zero-copy, parser combinators library + +# Upstream license specification: MIT +License: MIT +URL: https://crates.io/crates/nom +Source: %{crates_source} +# Initial patched metadata +# * drop benchmarks and examples not shipped with the crate +# * drop criterion (too old) and jemallocator (not packaged) dev-dependencies +Patch0: nom-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Byte-oriented, zero-copy, parser combinators library.} + +%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 +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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_no_tilde}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages +which use "alloc" feature of "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+lazy_static-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+lazy_static-devel %{_description} + +This package contains library source intended for building other packages +which use "lazy_static" feature of "%{crate}" crate. + +%files -n %{name}+lazy_static-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+lexical-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+lexical-devel %{_description} + +This package contains library source intended for building other packages +which use "lexical" feature of "%{crate}" crate. + +%files -n %{name}+lexical-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+lexical-core-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+lexical-core-devel %{_description} + +This package contains library source intended for building other packages +which use "lexical-core" feature of "%{crate}" crate. + +%files -n %{name}+lexical-core-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+regex-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regex-devel %{_description} + +This package contains library source intended for building other packages +which use "regex" feature of "%{crate}" crate. + +%files -n %{name}+regex-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+regexp-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regexp-devel %{_description} + +This package contains library source intended for building other packages +which use "regexp" feature of "%{crate}" crate. + +%files -n %{name}+regexp-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+regexp_macros-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regexp_macros-devel %{_description} + +This package contains library source intended for building other packages +which use "regexp_macros" feature of "%{crate}" crate. + +%files -n %{name}+regexp_macros-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages +which use "std" feature of "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Mon Jan 25 2021 Fabio Valentini - 5.1.2-1 +- Initial compat package for nom 5 diff --git a/sources b/sources new file mode 100644 index 0000000..0284b15 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (nom-5.1.2.crate) = 53b8ddab62475588efae46c78b5fd086a14c0fa505c84e625fbedd6dc74d4ac047e9fbed7312b797f126e9ca1f056458d8ffe0ab13f0117de685ef8b43f86aca