File rust-git2.spec of Package rust-git2

Patch1: fix_2024100230465804.diff
#
# spec file for package rust-git2
#
# Copyright (c) 2024 u <u>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}

%global crate git2

Name:           rust-git2
Version:        0.18.3
Release:        0
Summary:        Bindings to libgit2 for interoperating with git repositories
Group:          Development/Libraries/Rust

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/git2
Source:         https://crates.io/api/v1/crates/%crate/%version/download#/%crate-%version.crate

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging >= 21
BuildRequires:  (crate(bitflags/default) >= 2.1.0 with crate(bitflags/default) < 3.0.0~)
BuildRequires:  (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)
BuildRequires:  (crate(libgit2-sys/default) >= 0.16.2 with crate(libgit2-sys/default) < 0.17.0~)
BuildRequires:  (crate(libgit2-sys/https) >= 0.16.2 with crate(libgit2-sys/https) < 0.17.0~)
BuildRequires:  (crate(libgit2-sys/ssh) >= 0.16.2 with crate(libgit2-sys/ssh) < 0.17.0~)
BuildRequires:  (crate(libgit2-sys/ssh_key_from_memory) >= 0.16.2 with crate(libgit2-sys/ssh_key_from_memory) < 0.17.0~)
BuildRequires:  (crate(log/default) >= 0.4.8 with crate(log/default) < 0.5.0~)
BuildRequires:  (crate(openssl-probe/default) >= 0.1.0 with crate(openssl-probe/default) < 0.2.0~)
BuildRequires:  (crate(openssl-sys/default) >= 0.9.45 with crate(openssl-sys/default) < 0.10.0~)
BuildRequires:  (crate(url/default) >= 2.0.0 with crate(url/default) < 3.0.0~)
%if %{with check}
BuildRequires:  (crate(clap/default) >= 4.4.13 with crate(clap/default) < 5.0.0~)
BuildRequires:  (crate(clap/derive) >= 4.4.13 with crate(clap/derive) < 5.0.0~)
BuildRequires:  (crate(tempfile/default) >= 3.1.0 with crate(tempfile/default) < 4.0.0~)
BuildRequires:  (crate(time/default) >= 0.1.39 with crate(time/default) < 1.2.0~)
%endif

%global _description %{expand:
Bindings to libgit2 for interoperating with git repositories. This
library is both threadsafe and memory safe and allows both reading and
writing git repositories.}

%description %{_description}

%package        devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
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-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/CONTRIBUTING.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
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}+https-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+openssl-probe-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+openssl-probe-devel %{_description}

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

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

%package     -n %{name}+openssl-sys-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+openssl-sys-devel %{_description}

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

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

%package     -n %{name}+ssh-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+ssh_key_from_memory-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+unstable-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

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

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

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

%package     -n %{name}+vendored-libgit2-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+vendored-libgit2-devel %{_description}

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

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

%package     -n %{name}+vendored-openssl-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+vendored-openssl-devel %{_description}

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

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

%package     -n %{name}+zlib-ng-compat-devel
Summary:        %{summary}
Group:          Development/Libraries/Rust
BuildArch:      noarch

%description -n %{name}+zlib-ng-compat-devel %{_description}

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

%files       -n %{name}+zlib-ng-compat-devel
%ghost %{crate_instdir}/Cargo.toml

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

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%endif

%changelog
* Tue Apr 09 19:02:52 MSK 2024 u <u>
- Version 0.18.3
- Initial package
openSUSE Build Service is sponsored by