## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

# Generated by rust2rpm 21
# Generated with `rust2rpm -a --all-features vcsgraph` to enable optional
# `cli` feature with binary files.
# This is required because of https://pagure.io/fedora-rust/rust2rpm/issue/110
%bcond_without check

%global crate vcsgraph

Name:           rust-%{crate}
Version:        0.2.0
Release:        %autorelease
Summary:        Library to perform various computation of a version control graph

# Upstream license specification: GPL-2.0-or-later
License:        GPLv2+
URL:            https://crates.io/crates/vcsgraph
Source:         %{crates_source}

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
Library to perform various computation of a version control graph.}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}

%description -n %{crate} %{_description}

%files       -n %{crate}
# Missing license file: https://foss.heptapod.net/mercurial/vcsgraph/-/issues/16
%doc README.md
%{_bindir}/analytics
%{_bindir}/testing

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

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
# Missing license file: https://foss.heptapod.net/mercurial/vcsgraph/-/issues/16
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%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 the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+cli-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+cli-devel %{_description}

This package contains library source intended for building other packages which
use the "cli" feature of the "%{crate}" crate.

%files       -n %{name}+cli-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+structopt-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+structopt-devel %{_description}

This package contains library source intended for building other packages which
use the "structopt" feature of the "%{crate}" crate.

%files       -n %{name}+structopt-devel
%ghost %{crate_instdir}/Cargo.toml

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

%generate_buildrequires
%cargo_generate_buildrequires -a

%build
%cargo_build -a

%install
%cargo_install -a

%if %{with check}
%check
%cargo_test -a
%endif

%changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Tue Apr 05 2022 Aleksei Bavshin <alebastr@fedoraproject.org> 0.2.0-1
- Initial import (#2064155)