Blob Blame History Raw
# Generated by rust2rpm
# aho-corasick(dev) -> quickcheck(opt) -> env_logger(opt) -> regex -> aho-corasick
%bcond_with check
%global debug_package %{nil}

%global crate aho-corasick

Name:           rust-%{crate}
Version:        0.6.4
Release:        3%{?dist}
Summary:        Fast multiple substring searching with finite state machines

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
# * Bump quickcheck to 0.6, rand to 0.4, https://github.com/BurntSushi/aho-corasick/pull/23
Patch0:         aho-corasick-0.6.4-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(memchr) >= 2.0.0 with crate(memchr) < 3.0.0)
%if %{with check}
# [dev-dependencies]
BuildRequires:  (crate(csv) >= 0.15.0 with crate(csv) < 0.16.0)
BuildRequires:  (crate(docopt) >= 0.7.0 with crate(docopt) < 0.8.0)
BuildRequires:  (crate(memmap) >= 0.5.0 with crate(memmap) < 0.6.0)
BuildRequires:  (crate(quickcheck) >= 0.6.0 with crate(quickcheck) < 0.7.0)
BuildRequires:  (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0)
BuildRequires:  (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0)
%endif

%description
%{summary}.

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel
Fast multiple substring searching with finite state machines.

This package contains library source intended for building other packages
which use %{crate} from crates.io.

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%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
* Mon Jan 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.4-3
- Rebuild for rust-packaging v5

* Mon Jan 01 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.4-2
- Bump quickcheck to 0.6
- Bump rand to 0.4

* Thu Nov 30 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.4-1
- Update to 0.6.4

* Wed Nov 29 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-5
- Bump quickcheck to 0.5

* Fri Nov 10 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-4
- Exclude more unneeded files

* Wed Nov 08 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-3
- Bump memchr to 2

* Wed Jun 14 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-2
- Port to use rust-packaging

* Thu Mar 30 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.3-1
- Update to 0.6.3

* Sat Mar 11 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.2-3
- Rename with rust prefix
- Don't ship useless binary

* Fri Feb 24 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.2-2
- Use rich dependencies

* Sat Feb 18 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.2-1
- Initial package