From e41e699750ca0ca1577b38febdf3c7a4cb0aace2 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 16 Apr 2019 11:35:59 +0200 Subject: [PATCH] Initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + regex-automata-fix-metadata.diff | 11 +++ rust-regex-automata.spec | 119 +++++++++++++++++++++++++++++++ sources | 1 + tests/.fmf/version | 1 + tests/provision.fmf | 5 ++ tests/tests.yml | 13 ++++ 7 files changed, 151 insertions(+) create mode 100644 .gitignore create mode 100644 regex-automata-fix-metadata.diff create mode 100644 rust-regex-automata.spec create mode 100644 sources create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..16ccec8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/regex-automata-0.1.6.crate diff --git a/regex-automata-fix-metadata.diff b/regex-automata-fix-metadata.diff new file mode 100644 index 0000000..7e42d09 --- /dev/null +++ b/regex-automata-fix-metadata.diff @@ -0,0 +1,11 @@ +--- regex-automata-0.1.6/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ regex-automata-0.1.6/Cargo.toml 2019-04-16T06:34:36.793307+00:00 +@@ -14,7 +14,7 @@ + name = "regex-automata" + version = "0.1.6" + authors = ["Andrew Gallant "] +-exclude = ["/.travis.yml", "/appveyor.yml", "/ci/*", "/scripts/*", "/regex-automata-debug"] ++exclude = ["/.travis.yml", "/appveyor.yml", "/ci/*", "/scripts/*", "/regex-automata-debug", "/data/*"] + autotests = false + description = "Automata construction and matching using regular expressions." + homepage = "https://github.com/BurntSushi/regex-automata" diff --git a/rust-regex-automata.spec b/rust-regex-automata.spec new file mode 100644 index 0000000..4bce52c --- /dev/null +++ b/rust-regex-automata.spec @@ -0,0 +1,119 @@ +# Generated by rust2rpm +%bcond_with check +%global debug_package %{nil} + +%global crate regex-automata + +Name: rust-%{crate} +Version: 0.1.6 +Release: 1%{?dist} +Summary: Automata construction and matching using regular expressions + +# Upstream license specification: Unlicense/MIT +License: Unlicense or MIT +URL: https://crates.io/crates/regex-automata +Source: %{crates_source} +# Initial patched metadata +# * Exclude test files +Patch0: regex-automata-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(byteorder) >= 1.2.7 with crate(byteorder) < 2.0.0) +BuildRequires: (crate(regex-syntax/default) >= 0.6.4 with crate(regex-syntax/default) < 0.7.0) +BuildRequires: (crate(utf8-ranges/default) >= 1.0.0 with crate(utf8-ranges/default) < 2.0.0) +%if %{with check} +BuildRequires: (crate(lazy_static/default) >= 1.2.0 with crate(lazy_static/default) < 2.0.0) +BuildRequires: (crate(regex/default) >= 1.1.0 with crate(regex/default) < 2.0.0) +BuildRequires: (crate(serde/default) >= 1.0.82 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde_bytes/default) >= 0.10.4 with crate(serde_bytes/default) < 0.11.0) +BuildRequires: (crate(serde_derive/default) >= 1.0.82 with crate(serde_derive/default) < 2.0.0) +BuildRequires: (crate(toml/default) >= 0.4.10 with crate(toml/default) < 0.5.0) +%endif + +%global _description \ +Automata construction and matching using regular expressions. + +%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-MIT UNLICENSE COPYING +%doc README.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}+regex-syntax-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regex-syntax-devel %{_description} + +This package contains library source intended for building other packages +which use "regex-syntax" feature of "%{crate}" crate. + +%files -n %{name}+regex-syntax-devel +%ghost %{cargo_registry}/%{crate}-%{version}/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}/Cargo.toml + +%package -n %{name}+utf8-ranges-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+utf8-ranges-devel %{_description} + +This package contains library source intended for building other packages +which use "utf8-ranges" feature of "%{crate}" crate. + +%files -n %{name}+utf8-ranges-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Tue Apr 16 08:34:36 CEST 2019 Igor Gnatenko - 0.1.6-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..1d19be9 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (regex-automata-0.1.6.crate) = 2e438167ef10459cb1f7ab7afe0297e3a93e34b8195d631206c804b4fc5498e03df243531df282928fb2b3bc4ab8dd0a15a101f9aa368c104fc24df190e85f14 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..a692d64 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-regex-automata