3 %bcond_without kerberos5 # GSSAPI for SPNEGO auth
4 %bcond_without libssh # SSH support via libssh2
5 %bcond_with tests # build without tests
8 Summary(pl.UTF-8): Biblioteka Git dla C
12 License: GPL v2 with linking exception
14 #Source0Download: https://github.com/libgit2/libgit2/releases
15 Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 61b3421e91c7e0e2938dfb36c26f19ba
17 Patch0: %{name}-no-libgit2-test.patch
18 Patch1: pcre2-detect.ptch
19 URL: http://libgit2.github.com/
20 BuildRequires: cmake >= 3.5.1
21 %{?with_kerberos5:BuildRequires: heimdal-devel}
22 BuildRequires: http-parser-devel >= 2
23 %{?with_libssh:BuildRequires: libssh2-devel}
24 BuildRequires: openssl-devel
25 BuildRequires: pcre2-8-devel
26 BuildRequires: pkgconfig
27 %{?with_tests:BuildRequires: python}
28 BuildRequires: rpmbuild(macros) >= 1.742
29 BuildRequires: zlib-devel
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 libgit2 is a portable, pure C implementation of the Git core methods
34 provided as a re-entrant linkable library with a solid API, allowing
35 you to write native speed custom Git applications in any language with
38 %description -l pl.UTF-8
39 libgit2 to przenośna implementacja w czystym C głównych metod Gita,
40 udostępniona jako bezpieczna dla wątków biblioteka ze stałym API,
41 pozwalająca na pisanie własnych aplikacji dla Gita o natywnej
42 szybkości w dowolnym języku posiadającym odpowiednie wiązania.
45 Summary: Header files for libgit2 library
46 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgit2
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
49 Requires: http-parser-devel
50 Requires: libssh2-devel
51 Requires: openssl-devel
55 Header files for libgit2 library.
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki libgit2.
66 sed -i '/ADD_TEST(online/s/^/#/' tests/CMakeLists.txt
71 # CMakeLists.txt supports only relative LIB_INSTALL_DIR and INCLUDE_INSTALL_DIR
72 # (otherwise .pc file is generated incorrectly).
73 # Type (:PATH or :STRING) must be specified explicitly to avoid expansion
76 %{cmake_on_off tests BUILD_TESTS} \
77 -DREGEX_BACKEND=pcre2 \
78 %{cmake_on_off kerberos5 USE_GSSAPI} \
79 -DUSE_HTTP_PARSER=system \
80 %{cmake_on_off libssh USE_SSH}
83 %{?with_tests:%{__make} test ARGS="-V"}
86 rm -rf $RPM_BUILD_ROOT
88 %{__make} -C build install \
89 DESTDIR=$RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
94 %post -p /sbin/ldconfig
95 %postun -p /sbin/ldconfig
98 %defattr(644,root,root,755)
99 %doc AUTHORS docs/contributing.md COPYING README.md
100 %attr(755,root,root) %{_libdir}/libgit2.so.*.*.*
101 %attr(755,root,root) %ghost %{_libdir}/libgit2.so.1.4
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_libdir}/libgit2.so
106 %{_includedir}/git2.h
108 %{_pkgconfigdir}/libgit2.pc