From 7b765f0d95e27bd91aa35b83c4edfb97fd6109bb Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 3 Nov 2018 15:50:05 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-onig_sys.spec | 86 ++++++++++++++++++++++++++++++++------------- tests/.fmf/version | 1 + tests/provision.fmf | 5 +++ tests/tests.yml | 13 +++++++ 4 files changed, 80 insertions(+), 25 deletions(-) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/rust-onig_sys.spec b/rust-onig_sys.spec index 9d76101..acbefd9 100644 --- a/rust-onig_sys.spec +++ b/rust-onig_sys.spec @@ -1,14 +1,13 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} -%global onig_min 6.8.0 - %global crate onig_sys Name: rust-%{crate} Version: 69.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Raw rust bindings to the oniguruma library License: MIT @@ -20,32 +19,70 @@ Patch0: rust-onig_sys-use-system-onig.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -# [build-dependencies] -BuildRequires: (crate(cc) >= 1.0.0 with crate(cc) < 2.0.0) -BuildRequires: (crate(pkg-config) >= 0.3.0 with crate(pkg-config) < 0.4.0) -BuildRequires: pkgconfig(oniguruma) >= %{onig_min} +BuildRequires: (crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(pkg-config/default) >= 0.3.0 with crate(pkg-config/default) < 0.4.0) +BuildRequires: pkgconfig(oniguruma) >= 6.8.0 + +%global _description \ +The `onig_sys` crate contains raw rust bindings to the oniguruma library.\ +This crate exposes a set of unsafe functions which can then\ +be used by other crates to create safe wrappers around Oniguruma.\ +\ +You probably don't want to link to this crate directly;\ +instead check out the `onig` crate. -%description -%{summary}. +%description %{_description} %package devel Summary: %{summary} -Requires: pkgconfig(oniguruma) >= %{onig_min} BuildArch: noarch +Requires: pkgconfig(oniguruma) >= 6.8.0 -%description devel -The `onig_sys` crate contains raw rust bindings to the -oniguruma library. This crate exposes a set of unsafe -functions which can then be used by other crates to -create safe wrappers around Oniguruma. +%description devel %{_description} -You probably don't want to link to this crate directly; -instead check out the `onig` crate. +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE.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}+posix-api-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+posix-api-devel %{_description} + +This package contains library source intended for building other packages +which use "posix-api" feature of "%{crate}" crate. + +%files -n %{name}+posix-api-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+print-debug-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+print-debug-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "print-debug" feature of "%{crate}" crate. + +%files -n %{name}+print-debug-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -63,11 +100,10 @@ rm -vrf oniguruma/ %cargo_test %endif -%files devel -%license LICENSE.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Sat Nov 03 2018 Igor Gnatenko - 69.0.0-2 +- Adapt to new packaging + * Sat Sep 08 2018 Igor Gnatenko - 69.0.0-1 - Update to 69.0.0 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..d8557a2 --- /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-onig_sys