parent
f6e595aaf6
commit
ea31e47919
@ -0,0 +1 @@
|
|||||||
|
/libgit2-sys-0.6.16.crate
|
@ -0,0 +1,30 @@
|
|||||||
|
From b5fcfdab05bbea12872e445517e16ec0e79f2803 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Sun, 26 Nov 2017 12:22:51 +0100
|
||||||
|
Subject: [PATCH] build.rs: always use pkg-config
|
||||||
|
|
||||||
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
---
|
||||||
|
libgit2-sys/build.rs | 6 ++----
|
||||||
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libgit2-sys/build.rs b/libgit2-sys/build.rs
|
||||||
|
index c7545c2..b7aefcf 100644
|
||||||
|
--- a/libgit2-sys/build.rs
|
||||||
|
+++ b/libgit2-sys/build.rs
|
||||||
|
@@ -31,10 +31,8 @@ fn main() {
|
||||||
|
}
|
||||||
|
let has_pkgconfig = Command::new("pkg-config").output().is_ok();
|
||||||
|
|
||||||
|
- if env::var("LIBGIT2_SYS_USE_PKG_CONFIG").is_ok() {
|
||||||
|
- if pkg_config::find_library("libgit2").is_ok() {
|
||||||
|
- return
|
||||||
|
- }
|
||||||
|
+ if pkg_config::find_library("libgit2").is_ok() {
|
||||||
|
+ return
|
||||||
|
}
|
||||||
|
|
||||||
|
if !Path::new("libgit2/.git").exists() {
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
@ -0,0 +1,72 @@
|
|||||||
|
# Generated by rust2rpm
|
||||||
|
%bcond_without check
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%global crate libgit2-sys
|
||||||
|
|
||||||
|
Name: rust-%{crate}
|
||||||
|
Version: 0.6.16
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Native bindings to the libgit2 library
|
||||||
|
|
||||||
|
# https://github.com/alexcrichton/git2-rs/pull/271
|
||||||
|
License: MIT or ASL 2.0
|
||||||
|
URL: https://crates.io/crates/libgit2-sys
|
||||||
|
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
|
||||||
|
# Doesn't seem to be upstreamable
|
||||||
|
Patch0: 0001-build.rs-always-use-pkg-config.patch
|
||||||
|
|
||||||
|
ExclusiveArch: %{rust_arches}
|
||||||
|
|
||||||
|
BuildRequires: rust-packaging
|
||||||
|
# [dependencies]
|
||||||
|
BuildRequires: (crate(curl-sys) >= 0.3.12 with crate(curl-sys) < 0.4.0)
|
||||||
|
BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0)
|
||||||
|
BuildRequires: (crate(libssh2-sys) >= 0.2.4 with crate(libssh2-sys) < 0.3.0)
|
||||||
|
BuildRequires: crate(libz-sys) >= 0.0.0
|
||||||
|
BuildRequires: (crate(openssl-sys) >= 0.9.0 with crate(openssl-sys) < 0.10.0)
|
||||||
|
# [build-dependencies]
|
||||||
|
BuildRequires: (crate(cc) >= 1.0.0 with crate(cc) < 2.0.0)
|
||||||
|
BuildRequires: (crate(cmake) >= 0.1.2 with crate(cmake) < 0.2.0)
|
||||||
|
BuildRequires: (crate(pkg-config) >= 0.3.0 with crate(pkg-config) < 0.4.0)
|
||||||
|
BuildRequires: pkgconfig(libgit2)
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: %{summary}
|
||||||
|
Requires: pkgconfig(libgit2)
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Native bindings to the libgit2 library.
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages
|
||||||
|
which use %{crate} from crates.io.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{crate}-%{version} -N
|
||||||
|
sed -i 's/\r$//' build.rs
|
||||||
|
%autopatch -p2
|
||||||
|
# Bundled deps
|
||||||
|
rm -vrf libgit2
|
||||||
|
%cargo_prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%cargo_test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{cargo_registry}/%{crate}-%{version}/
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Nov 26 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.16-1
|
||||||
|
- Initial package
|
Loading…
Reference in new issue