From 025a749d940d19a2abc0477dd515a44a7de80703 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 27 Oct 2018 23:04:15 +0200 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- aho-corasick-fix-metadata.diff | 11 ++++++ rust-aho-corasick.spec | 65 ++++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 23 deletions(-) create mode 100644 aho-corasick-fix-metadata.diff diff --git a/aho-corasick-fix-metadata.diff b/aho-corasick-fix-metadata.diff new file mode 100644 index 0000000..8be7b76 --- /dev/null +++ b/aho-corasick-fix-metadata.diff @@ -0,0 +1,11 @@ +--- aho-corasick-0.6.8/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ aho-corasick-0.6.8/Cargo.toml 2018-10-27T23:02:05.293757+02:00 +@@ -14,7 +14,7 @@ + name = "aho-corasick" + version = "0.6.8" + authors = ["Andrew Gallant "] +-exclude = ["benches/sherlock.txt"] ++exclude = ["/benches/sherlock.txt", "/ci/*", "/.travis.yml", "/Makefile", "/ctags.rust", "/session.vim"] + description = "Fast multiple substring searching with finite state machines." + homepage = "https://github.com/BurntSushi/aho-corasick" + readme = "README.md" diff --git a/rust-aho-corasick.spec b/rust-aho-corasick.spec index c1f135c..8c63e3c 100644 --- a/rust-aho-corasick.spec +++ b/rust-aho-corasick.spec @@ -1,47 +1,70 @@ # Generated by rust2rpm -# Tests are run in infrastructure +# * Tests are run in infrastructure %bcond_with check %global debug_package %{nil} +# Binary is useless +%global __cargo_is_bin() false + %global crate aho-corasick Name: rust-%{crate} Version: 0.6.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Fast multiple substring searching with finite state machines +# Upstream license specification: Unlicense/MIT License: Unlicense or MIT URL: https://crates.io/crates/aho-corasick Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude useless files, https://github.com/BurntSushi/aho-corasick/pull/38 +Patch0: aho-corasick-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(memchr) >= 2.0.0 with crate(memchr) < 3.0.0) +BuildRequires: (crate(memchr/default) >= 2.0.0 with crate(memchr/default) < 3.0.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(csv) >= 1.0.0 with crate(csv) < 2.0.0) -BuildRequires: (crate(docopt) >= 1.0.0 with crate(docopt) < 2.0.0) -BuildRequires: (crate(memmap) >= 0.6.0 with crate(memmap) < 0.7.0) +BuildRequires: (crate(csv/default) >= 1.0.0 with crate(csv/default) < 2.0.0) +BuildRequires: (crate(docopt/default) >= 1.0.0 with crate(docopt/default) < 2.0.0) +BuildRequires: (crate(memmap/default) >= 0.6.0 with crate(memmap/default) < 0.7.0) BuildRequires: (crate(quickcheck) >= 0.7.0 with crate(quickcheck) < 0.8.0) -BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0) -BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) -BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0) +BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0) +BuildRequires: (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0) +BuildRequires: (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0) %endif -%description -%{summary}. +%global _description \ +Fast multiple substring searching with finite state machines. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Fast multiple substring searching with finite state machines. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license UNLICENSE LICENSE-MIT 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 %{crate} from crates.io. +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 @@ -58,14 +81,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license UNLICENSE LICENSE-MIT COPYING -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,ctags.rust,session.vim} -%exclude %{_bindir}/aho-corasick-dot - %changelog +* Sat Oct 27 2018 Igor Gnatenko - 0.6.8-2 +- Adapt to new packaging + * Thu Aug 30 2018 Josh Stone - 0.6.8-1 - Update to 0.6.8