diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3bdbe9c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pest_meta-2.0.3.crate diff --git a/pest_meta-fix-metadata.diff b/pest_meta-fix-metadata.diff new file mode 100644 index 0000000..3a657eb --- /dev/null +++ b/pest_meta-fix-metadata.diff @@ -0,0 +1,11 @@ +--- pest_meta-2.0.3/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ pest_meta-2.0.3/Cargo.toml 2018-11-10T12:29:52.584697+01:00 +@@ -29,8 +29,6 @@ + + [dependencies.pest] + version = "2.0" +-[build-dependencies.sha-1] +-version = "0.7.0" + [badges.codecov] + repository = "pest-parser/pest" + diff --git a/rust-pest_meta.spec b/rust-pest_meta.spec new file mode 100644 index 0000000..4f6a5b4 --- /dev/null +++ b/rust-pest_meta.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm +# * Tests are run in infrastructure +%bcond_with check +%global debug_package %{nil} + +%global crate pest_meta + +Name: rust-%{crate} +Version: 2.0.3 +Release: 1%{?dist} +Summary: Pest meta language parser and validator + +# Upstream license specification: MIT/Apache-2.0 +# https://github.com/pest-parser/pest/pull/322 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/pest_meta +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Remove sha-1 build-dep because it is not packaged +# and build.rs is not shipped. +Patch0: pest_meta-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(maplit/default) >= 1.0.0 with crate(maplit/default) < 2.0.0) +BuildRequires: (crate(pest/default) >= 2.0.0 with crate(pest/default) < 3.0.0) + +%global _description \ +Pest meta language parser and validator. + +%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 +%{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 + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Sat Nov 10 2018 Igor Gnatenko - 2.0.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..62d660b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pest_meta-2.0.3.crate) = aeb0e4741d7752931d0adc76cf8fcf09f341d83af647dea7eee8331b7bef50a6092cb77c42c874989fa6386ea0516220c52b574be2e55724225966ffcec0b3bb 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..602d5be --- /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-pest_meta