File project.diff of Package libgit2
--- libgit2.spec.orig
+++ libgit2.spec
@@ -1,7 +1,7 @@
#
# spec file for package libgit2
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -17,6 +17,7 @@
#
+%bcond_without just_build_devel
%define sover 1_6
Name: libgit2
Version: 1.6.4
@@ -51,21 +52,23 @@ provided as a re-entrant linkable librar
you to write native speed custom Git applications in any language
with bindings.
-%package devel
+%package -n libgit2-1.6-devel
Summary: C git library
Group: Development/Libraries/C and C++
Requires: %{name}-%{sover} >= %{version}
-%description devel
+%description -n libgit2-1.6-devel
This package contains all necessary include files and libraries needed
to compile and develop applications that use libgit2.
+%if %{without just_build_devel}
%package tools
Summary: A Git command-line interface based on libgit2
Group: Development/Tools/Version Control
%description tools
This package contains a git cli based on libgit2.
+%endif
%prep
%autosetup -p1
@@ -81,24 +84,28 @@ find examples -type f -name ".gitignore"
%install
%cmake_install
+%if %{with just_build_devel}
+rm -rv %{buildroot}%{_bindir}
+%endif
-%post -n %{name}-%{sover} -p /sbin/ldconfig
-%postun -n %{name}-%{sover} -p /sbin/ldconfig
+%ldconfig_scriptlets -n %{name}-%{sover}
%files -n %{name}-%{sover}
%license COPYING
%doc AUTHORS README.md
%{_libdir}/%{name}.so.*
-%files devel
+%files -n libgit2-1.6-devel
%license COPYING
%doc examples
%{_libdir}/%{name}.so
%{_includedir}/git2*
%{_libdir}/pkgconfig/libgit2.pc
+%if %{without just_build_devel}
%files tools
%license COPYING
%{_bindir}/*
+%endif
%changelog