]> git.pld-linux.org Git - packages/libgit2.git/blobdiff - libgit2.spec
up to 1.7.2 (fixes CVE-2024-24575 CVE-2024-24577)
[packages/libgit2.git] / libgit2.spec
index 6a3e4b32fd2ab2b7fcce29e868e2e56e3bacdb7f..cb8cc182c9b6ec96937a0154103a3046ea12c9bf 100644 (file)
@@ -1,25 +1,30 @@
 #
 # Conditional build:
-%bcond_without tests           # build without tests
-%bcond_with    tests_online    # build with tests reqiuring online access
+%bcond_without kerberos5       # GSSAPI for SPNEGO auth
+%bcond_without libssh          # SSH support via libssh2
+%bcond_with    tests           # build without tests
 
-Summary:       C git library
-Summary(pl.UTF-8):     Biblioteka git dla C
+Summary:       C Git library
+Summary(pl.UTF-8):     Biblioteka Git dla C
 Name:          libgit2
-Version:       0.21.0
+Version:       1.7.2
 Release:       1
 License:       GPL v2 with linking exception
 Group:         Libraries
+#Source0Download: https://github.com/libgit2/libgit2/releases
 Source0:       https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 06b598bf21b0536dcbf454dc63af2313
-Patch0:                %{name}-test-online.patch
-Patch1:                %{name}-no-libgit2-test.patch
+# Source0-md5: fa4f30e57c67fabee18c5961af72fb3f
+Patch0:                %{name}-no-libgit2-test.patch
 URL:           http://libgit2.github.com/
-BuildRequires: cmake >= 2.6
-BuildRequires: http-parser-devel
-BuildRequires: libssh2-devel
+BuildRequires: cmake >= 3.5.1
+%{?with_kerberos5:BuildRequires:       heimdal-devel}
+BuildRequires: http-parser-devel >= 2
+%{?with_libssh:BuildRequires:  libssh2-devel}
 BuildRequires: openssl-devel
+BuildRequires: pcre2-8-devel
+BuildRequires: pkgconfig
 %{?with_tests:BuildRequires:   python}
+BuildRequires: rpmbuild(macros) >= 1.742
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -39,7 +44,7 @@ szybkości w dowolnym języku posiadającym odpowiednie wiązania.
 Summary:       Header files for libgit2 library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libgit2
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}%{?_isa} = %{version}-%{release}
 Requires:      http-parser-devel
 Requires:      libssh2-devel
 Requires:      openssl-devel
@@ -51,10 +56,24 @@ Header files for libgit2 library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki libgit2.
 
+%package tools
+Summary:       Tools for libgit2 library
+Summary(pl.UTF-8):     Narzędzia dla biblioteki libgit2
+Group:         Application
+Requires:      %{name}%{?_isa} = %{version}-%{release}
+
+%description tools
+Tools for libgit2 library.
+
+%description tools -l pl.UTF-8
+Narzędzia dla biblioteki libgit2.
+
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+
+# Don't test network
+sed -i '/ADD_TEST(online/s/^/#/' tests/CMakeLists.txt
 
 %build
 install -d build
@@ -64,16 +83,18 @@ cd build
 # Type (:PATH or :STRING) must be specified explicitly to avoid expansion
 # relative to cwd.
 %cmake .. \
-       -DINCLUDE_INSTALL_DIR:PATH=include \
-       -DLIB_INSTALL_DIR:PATH=%{_lib} \
-       %{?with_tests_online:-DONLINE_TESTS:BOOL=ON} \
-       -DTHREADSAFE:BOOL=ON
+       %{cmake_on_off tests BUILD_TESTS} \
+       -DREGEX_BACKEND=pcre2 \
+       %{cmake_on_off kerberos5 USE_GSSAPI} \
+       -DUSE_HTTP_PARSER=system \
+       %{cmake_on_off libssh USE_SSH}
 %{__make}
 
 %{?with_tests:%{__make} test ARGS="-V"}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
@@ -85,9 +106,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS CONTRIBUTING.md COPYING README.md
+%doc AUTHORS docs/contributing.md COPYING README.md
 %attr(755,root,root) %{_libdir}/libgit2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgit2.so.21
+%attr(755,root,root) %ghost %{_libdir}/libgit2.so.1.7
 
 %files devel
 %defattr(644,root,root,755)
@@ -95,3 +116,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/git2.h
 %{_includedir}/git2
 %{_pkgconfigdir}/libgit2.pc
+
+%files tools
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/git2
This page took 0.072923 seconds and 4 git commands to generate.