X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=libgit2.spec;h=d3152054409bc3aa8f775d406bfba0c24870e187;hb=b9a7f4e4f40312c06001e7d413a48dcff53248bc;hp=14839927af22b40eec50f65d9cc798df8aa2ac39;hpb=ce3c80807efba592920695193809998ff654d7f6;p=packages%2Flibgit2.git diff --git a/libgit2.spec b/libgit2.spec index 1483992..d315205 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -1,38 +1,34 @@ # # Conditional build: -%bcond_without curl # Use cURL for HTTP %bcond_without kerberos5 # GSSAPI for SPNEGO auth %bcond_without libssh # SSH support via libssh2 -%bcond_without tests # build without tests -%bcond_with tests_online # build with tests reqiuring online access +%bcond_with tests # build without tests Summary: C Git library Summary(pl.UTF-8): Biblioteka Git dla C Name: libgit2 -Version: 0.24.1 +Version: 1.4.4 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: 3674ca2d40388b1175e25b6f5a3a82ad -Patch0: %{name}-test-online.patch -Patch1: %{name}-no-libgit2-test.patch +# Source0-md5: ec27f13cc0cb2b5b512f2b3854d896fa +Patch0: %{name}-no-libgit2-test.patch +Patch1: pcre2-detect.ptch URL: http://libgit2.github.com/ -BuildRequires: cmake >= 2.8 -%{?with_curl:BuildRequires: curl-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) -# Usage: cmake_with BCOND_NAME [OPTION_NAME] -%define cmake_on_off() -D%{?2}%{!?2:%{1}}:BOOL=%{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}} - %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 @@ -66,6 +62,9 @@ Pliki nagłówkowe biblioteki libgit2. %patch0 -p1 %patch1 -p1 +# Don't test network +sed -i '/ADD_TEST(online/s/^/#/' tests/CMakeLists.txt + %build install -d build cd build @@ -74,20 +73,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} \ - %{cmake_on_off tests BUILD_CLAR} \ - %{cmake_on_off curl CURL} \ + %{cmake_on_off tests BUILD_TESTS} \ + -DREGEX_BACKEND=pcre2 \ %{cmake_on_off kerberos5 USE_GSSAPI} \ - %{cmake_on_off libssh USE_SSH} \ - %{cmake_on_off tests_online ONLINE_TESTS} \ - -DTHREADSAFE:BOOL=ON + -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 @@ -99,9 +96,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.24 +%attr(755,root,root) %ghost %{_libdir}/libgit2.so.1.4 %files devel %defattr(644,root,root,755)