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.
145 lines
3.8 KiB
145 lines
3.8 KiB
# Generated by rust2rpm 17
|
|
%bcond_without check
|
|
%global debug_package %{nil}
|
|
|
|
%global crate libgit2-sys
|
|
%global upstream_version 0.12.21+1.1.0
|
|
|
|
Name: rust-%{crate}
|
|
Version: 0.12.21
|
|
Release: %autorelease
|
|
Summary: Native bindings to the libgit2 library
|
|
|
|
# Upstream license specification: MIT/Apache-2.0
|
|
License: MIT or ASL 2.0
|
|
URL: https://crates.io/crates/libgit2-sys
|
|
Source: %{crates_source %{crate} %{upstream_version}}
|
|
# Initial patched metadata
|
|
# * Remove libgit2 version from version field
|
|
# * Remove zlib-ng features
|
|
Patch0: libgit2-sys-fix-metadata.diff
|
|
|
|
ExclusiveArch: %{rust_arches}
|
|
%if %{__cargo_skip_build}
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
BuildRequires: rust-packaging
|
|
|
|
%global _description %{expand:
|
|
Native bindings to the libgit2 library.}
|
|
|
|
%description %{_description}
|
|
|
|
%package devel
|
|
Summary: %{summary}
|
|
BuildArch: noarch
|
|
Requires: (pkgconfig(libgit2) >= 1.1.0 with pkgconfig(libgit2) < 2.0.0)
|
|
|
|
%description devel %{_description}
|
|
|
|
This package contains library source intended for building other packages
|
|
which use "%{crate}" crate.
|
|
|
|
%files devel
|
|
%license LICENSE-MIT LICENSE-APACHE
|
|
%{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 "default" feature of "%{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 "https" feature of "%{crate}" crate.
|
|
|
|
%files -n %{name}+https-devel
|
|
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
|
|
|
%package -n %{name}+libssh2-sys-devel
|
|
Summary: %{summary}
|
|
BuildArch: noarch
|
|
|
|
%description -n %{name}+libssh2-sys-devel %{_description}
|
|
|
|
This package contains library source intended for building other packages
|
|
which use "libssh2-sys" feature of "%{crate}" crate.
|
|
|
|
%files -n %{name}+libssh2-sys-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 "openssl-sys" feature of "%{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 "ssh" feature of "%{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 "ssh_key_from_memory" feature of "%{crate}" crate.
|
|
|
|
%files -n %{name}+ssh_key_from_memory-devel
|
|
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
|
|
|
|
%prep
|
|
%autosetup -n %{crate}-%{upstream_version} -p1
|
|
# Remove bundled dependencies
|
|
rm -vrf libgit2
|
|
%cargo_prep
|
|
|
|
%generate_buildrequires
|
|
%cargo_generate_buildrequires
|
|
%if ! %{__cargo_skip_build}
|
|
echo '(pkgconfig(libgit2) >= 1.1.0 with pkgconfig(libgit2) < 2.0.0)'
|
|
%endif
|
|
|
|
%build
|
|
%cargo_build
|
|
|
|
%install
|
|
%cargo_install
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|
|
%autochangelog
|