# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}
%global crate asyncgit
Name: rust-asyncgit
Version: 0.24.3
Release: %autorelease
Summary: Allow using git2 in a asynchronous context
License: MIT
URL: https://crates.io/crates/asyncgit
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * bump git2 dependency from 0.17 to 0.18
# * drop feature for building against vendored OpenSSL sources
Patch: asyncgit-fix-metadata.diff
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Allow using git2 in a asynchronous context.}
%description %{_description}
%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
%license %{crate_instdir}/LICENSE.md
%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}+trace-libgit-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+trace-libgit-devel %{_description}
This package contains library source intended for building other packages which
use the "trace-libgit" feature of the "%{crate}" crate.
%files -n %{name}+trace-libgit-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -p1
sed -i -e 's|/usr/bin/env python|/usr/bin/python3|' src/sync/hooks.rs
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%if %{with check}
echo '/usr/bin/git'
%endif
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
# * skip tests which require internet connectivity
%cargo_test -- -- --skip sync::submodules::tests::test_smoke
%endif
%changelog
%autochangelog