diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0b11d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/skeptic-0.13.4.crate diff --git a/rust-skeptic.spec b/rust-skeptic.spec new file mode 100644 index 0000000..43070ed --- /dev/null +++ b/rust-skeptic.spec @@ -0,0 +1,83 @@ +# Generated by rust2rpm +%bcond_with check +%global debug_package %{nil} + +%global crate skeptic + +Name: rust-%{crate} +Version: 0.13.4 +Release: 1%{?dist} +Summary: Test your Rust markdown documentation via Cargo + +# Upstream license specification: MIT/Apache-2.0 +# https://github.com/budziq/rust-skeptic/issues/96 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/skeptic +Source: %{crates_source} +# Initial patched metadata +# * Update bytecount to 0.5, https://github.com/budziq/rust-skeptic/pull/95 +Patch0: skeptic-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(bytecount/default) >= 0.5.0 with crate(bytecount/default) < 0.6.0) +BuildRequires: (crate(cargo_metadata/default) >= 0.6.0 with crate(cargo_metadata/default) < 0.7.0) +BuildRequires: (crate(error-chain) >= 0.12.0 with crate(error-chain) < 0.13.0) +BuildRequires: (crate(glob/default) >= 0.2.0 with crate(glob/default) < 0.3.0) +BuildRequires: (crate(pulldown-cmark) >= 0.2.0 with crate(pulldown-cmark) < 0.3.0) +BuildRequires: (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0) +BuildRequires: (crate(tempdir/default) >= 0.3.0 with crate(tempdir/default) < 0.4.0) +BuildRequires: (crate(walkdir/default) >= 2.2.0 with crate(walkdir/default) < 3.0.0) +%if %{with check} +BuildRequires: (crate(unindent/default) >= 0.1.0 with crate(unindent/default) < 0.2.0) +%endif + +%global _description \ +Test your Rust markdown documentation via Cargo. + +%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 +%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 + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Wed Mar 13 2019 Igor Gnatenko - 0.13.4-1 +- Initial package diff --git a/skeptic-fix-metadata.diff b/skeptic-fix-metadata.diff new file mode 100644 index 0000000..58ae8ed --- /dev/null +++ b/skeptic-fix-metadata.diff @@ -0,0 +1,11 @@ +--- skeptic-0.13.4/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ skeptic-0.13.4/Cargo.toml 2019-03-13T17:58:11.778083+01:00 +@@ -27,7 +27,7 @@ + name = "skeptic" + path = "lib.rs" + [dependencies.bytecount] +-version = "0.4" ++version = "0.5" + + [dependencies.cargo_metadata] + version = "0.6" diff --git a/sources b/sources new file mode 100644 index 0000000..a0f000b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (skeptic-0.13.4.crate) = ae0c236f9857ec8d82c2733f4f555e5fa0f0530a08105015d933fe5717c41b56d096c6c140e2d7a302a2c16ba7cd962213bdb3a6adbe084c55704e71902d8edb 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..f127956 --- /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-skeptic