[packages/delta] add system_libgit2 bcond
atler
atler at pld-linux.org
Mon Nov 20 20:33:31 CET 2023
commit c8b6b30d82597f6b8a5d320aafdd1f9674b8ad7b
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Nov 20 20:15:46 2023 +0100
add system_libgit2 bcond
delta.spec | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/delta.spec b/delta.spec
index 0a49fa9..ecd0711 100644
--- a/delta.spec
+++ b/delta.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without system_libgit2 # use system installed libgit2
+
%define crates_ver 0.16.4
Summary: A viewer for git and diff output
@@ -12,8 +16,10 @@ Source1: %{name}-crates-%{crates_ver}.tar.xz
# Source1-md5: b5036c583cd088b7699dcd7a2b42c999
URL: https://github.com/dandavison/delta
BuildRequires: cargo
+%if %{with system_libgit2}
BuildRequires: libgit2-devel < 1.6.0
BuildRequires: libgit2-devel >= 1.4.5
+%endif
BuildRequires: oniguruma-devel >= 6.9.3
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 2.004
@@ -21,7 +27,7 @@ BuildRequires: rust
BuildRequires: rust-bindgen
BuildRequires: tar >= 1:1.22
BuildRequires: xz
-Requires: libgit2 >= 1.4.5
+%{?with_system_libgit2:Requires: libgit2 >= 1.4.5}
Requires: oniguruma >= 6.9.3
ExclusiveArch: %{rust_arches}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/delta.git/commitdiff/c8b6b30d82597f6b8a5d320aafdd1f9674b8ad7b
More information about the pld-cvs-commit
mailing list