You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-git2/rust-git2.spec

156 lines
4.2 KiB

# Generated by rust2rpm 19
%bcond_without check
%global debug_package %{nil}
%global crate git2
Name: rust-%{crate}
Version: 0.13.20
Release: %autorelease
Summary: Bindings to libgit2 for interoperating with git repositories
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/git2
Source: %{crates_source}
# Initial patched metadata
4 years ago
# * No vendored/zlib-ng features
# * Bump thread-id to 4, https://github.com/rust-lang/git2-rs/pull/775
Patch0: git2-fix-metadata.diff
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%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}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use "%{crate}" crate.
%files devel
%license LICENSE-APACHE LICENSE-MIT
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+https-devel
Summary: %{summary}
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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+openssl-probe-devel
Summary: %{summary}
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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+openssl-sys-devel
Summary: %{summary}
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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+ssh-devel
Summary: %{summary}
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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+ssh_key_from_memory-devel
Summary: %{summary}
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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+unstable-devel
Summary: %{summary}
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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%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
%cargo_test
%endif
%changelog
%autochangelog