2022-11-13 02:41:39 +03:00
|
|
|
%define major 1.5
|
2014-09-15 17:08:05 +04:00
|
|
|
%define libname %mklibname git2_ %{major}
|
2016-10-04 21:41:23 +10:00
|
|
|
%define devname %mklibname git2 -d
|
2014-09-15 17:08:05 +04:00
|
|
|
|
|
|
|
Summary: A C implementation of the Git core methods as a library
|
2016-10-04 21:41:23 +10:00
|
|
|
Name: libgit2
|
2022-11-13 02:41:39 +03:00
|
|
|
Version: 1.5.0
|
2022-03-18 19:07:29 +03:00
|
|
|
Release: 1
|
2014-09-15 17:08:05 +04:00
|
|
|
License: GPLv2 with exceptions
|
2016-10-04 21:41:23 +10:00
|
|
|
Group: System/Libraries
|
2022-11-13 02:41:39 +03:00
|
|
|
URL: https://libgit2.org
|
2014-09-15 17:08:05 +04:00
|
|
|
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
|
2016-10-04 21:41:23 +10:00
|
|
|
BuildRequires: cmake
|
2022-03-18 19:07:29 +03:00
|
|
|
BuildRequires: pkgconfig(krb5-gssapi)
|
|
|
|
BuildRequires: pkgconfig(libpcre)
|
2015-04-07 19:57:58 +03:00
|
|
|
BuildRequires: pkgconfig(libssh2)
|
2016-10-04 21:41:23 +10:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2014-09-15 17:08:05 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
libgit2 is a portable, pure C implementation of the Git core methods
|
|
|
|
provided as a re-entrant linkable library with a solid API, allowing
|
|
|
|
you to write native speed custom Git applications in any language
|
|
|
|
with bindings.
|
|
|
|
|
2016-10-04 21:41:23 +10:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2014-09-15 17:08:05 +04:00
|
|
|
%package -n %{libname}
|
|
|
|
Summary: A C implementation of the Git core methods as a library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
libgit2 is a portable, pure C implementation of the Git core methods
|
|
|
|
provided as a re-entrant linkable library with a solid API, allowing
|
|
|
|
you to write native speed custom Git applications in any language
|
|
|
|
with bindings.
|
|
|
|
|
2016-10-04 21:41:23 +10:00
|
|
|
%files -n %{libname}
|
|
|
|
%doc README.md COPYING AUTHORS
|
|
|
|
%{_libdir}/libgit2.so.%{major}
|
2022-03-18 19:07:29 +03:00
|
|
|
%{_libdir}/libgit2.so.%{major}.*
|
2016-10-04 21:41:23 +10:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2014-09-15 17:08:05 +04:00
|
|
|
%package -n %{devname}
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/C
|
2016-10-04 21:41:23 +10:00
|
|
|
Requires: %{libname} = %{EVRD}
|
2014-09-15 17:08:05 +04:00
|
|
|
|
|
|
|
%description -n %{devname}
|
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
2016-10-04 21:41:23 +10:00
|
|
|
%files -n %{devname}
|
2022-11-13 02:41:39 +03:00
|
|
|
%doc AUTHORS docs examples README.md SECURITY.md COPYING
|
2016-10-04 21:41:23 +10:00
|
|
|
%{_libdir}/libgit2.so
|
|
|
|
%{_libdir}/pkgconfig/libgit2.pc
|
|
|
|
%{_includedir}/git2*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2014-09-15 17:08:05 +04:00
|
|
|
%prep
|
2022-03-18 19:07:29 +03:00
|
|
|
%autosetup -p1
|
2014-09-15 17:08:05 +04:00
|
|
|
|
|
|
|
# Remove VCS files from examples
|
|
|
|
find examples -name ".gitignore" -delete
|
|
|
|
|
2022-03-18 19:07:29 +03:00
|
|
|
# Remove some bundled libraries
|
|
|
|
rm -rf deps/{chromium-zlib,pcre,winhttp,zlib}
|
2014-09-15 17:08:05 +04:00
|
|
|
#rm -rf src/xdiff
|
|
|
|
|
|
|
|
%build
|
2015-04-07 19:57:58 +03:00
|
|
|
%cmake \
|
2022-03-18 19:07:29 +03:00
|
|
|
-DBUILD_TESTS=OFF \
|
|
|
|
-DUSE_SSH=ON
|
2020-01-13 15:44:35 +03:00
|
|
|
%make
|
2014-09-15 17:08:05 +04:00
|
|
|
|
|
|
|
%install
|
2020-01-13 15:44:35 +03:00
|
|
|
%makeinstall_std -C build
|
2014-09-15 17:08:05 +04:00
|
|
|
|
2016-10-04 21:41:23 +10:00
|
|
|
%check
|
|
|
|
ctest -V
|