# Generated by rust2rpm
%bcond_without check
%global debug_package %{nil}
%global crate askalono
Name: rust-%{crate}
Version: 0.3.0
Release: 1%{?dist}
Summary: Library to detect the contents of license files
# Upstream license specification: Apache-2.0
License: ASL 2.0
URL: https://crates.io/crates/askalono
Source: %{crates_source}
# To enable full tests:
# git clone https://github.com/amzn/askalono && cd askalono
# git submodule update --init
# tar -czf rust-askalono-0.3.0-datasets.tgz datasets/
# Source1: rust-askalono-0.3.0-datasets.tgz
# Initial patched metadata
# - Bump regex to 1 (already upstreamed)
Patch0: askalono-fix-metadata.diff
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
BuildRequires: (crate(failure/default) >= 0.1.1 with crate(failure/default) < 0.2.0)
BuildRequires: (crate(flate2/default) >= 1.0.1 with crate(flate2/default) < 2.0.0)
BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires: (crate(log/default) >= 0.4.1 with crate(log/default) < 0.5.0)
BuildRequires: (crate(rayon/default) >= 1.0.1 with crate(rayon/default) < 2.0.0)
BuildRequires: (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0)
BuildRequires: (crate(rmp-serde/default) >= 0.13.7 with crate(rmp-serde/default) < 0.14.0)
BuildRequires: (crate(serde/default) >= 1.0.33 with crate(serde/default) < 2.0.0)
BuildRequires: (crate(serde_derive/default) >= 1.0.33 with crate(serde_derive/default) < 2.0.0)
BuildRequires: (crate(serde_json/default) >= 1.0.11 with crate(serde_json/default) < 2.0.0)
BuildRequires: (crate(unicode-normalization/default) >= 0.1.5 with crate(unicode-normalization/default) < 0.2.0)
%if %{with check}
BuildRequires: (crate(env_logger/default) >= 0.5.5 with crate(env_logger/default) < 0.6.0)
%endif
%global _description \
A library to detect the contents of license files.
%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 CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md NOTICE README.md
%doc examples
%license LICENSE
%{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}+serde_json-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+serde_json-devel %{_description}
This package contains library source intended for building other packages
which use "serde_json" feature of "%{crate}" crate.
%files -n %{name}+serde_json-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+spdx-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+spdx-devel %{_description}
This package contains library source intended for building other packages
which use "spdx" feature of "%{crate}" crate.
%files -n %{name}+spdx-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
# The complete tests suite needs the dataset submodule
%cargo_test ||:
%endif
%changelog
* Thu Mar 28 09:11:54 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.3.0-1
- Initial package