]> git.pld-linux.org Git - packages/libgit2.git/blobdiff - libgit2.spec
- updated to 0.23.3
[packages/libgit2.git] / libgit2.spec
index d3cdc20c0c0c760f424072a126fae83dbe723abb..2c4a8e99fa1033a0ad8847ab5a7308a0eed47c80 100644 (file)
@@ -1,21 +1,28 @@
 #
 # Conditional build:
+%bcond_without kerberos5       # GSSAPI for SPNEGO auth
 %bcond_without tests           # build without tests
+%bcond_with    tests_online    # build with tests reqiuring online access
 
 Summary:       C git library
 Summary(pl.UTF-8):     Biblioteka git dla C
 Name:          libgit2
-Version:       0.18.0
+Version:       0.23.3
 Release:       1
 License:       GPL v2 with linking exception
 Group:         Libraries
-Source0:       https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz?/%{name}-version.tgz
-# Source0-md5: ce6845df0dd084ef2633a69dba64929c
-Patch0:                %{name}-http-parser.patch
+Source0:       https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: b33d043f655cc0671aeb95d62a75c981
+Patch0:                %{name}-test-online.patch
+Patch1:                %{name}-no-libgit2-test.patch
 URL:           http://libgit2.github.com/
-BuildRequires: cmake >= 2.6
-BuildRequires: http-parser-devel
+BuildRequires: cmake >= 2.8
+BuildRequires: curl-devel
+%{?with_kerberos5:BuildRequires:       heimdal-devel}
+BuildRequires: http-parser-devel >= 2
+BuildRequires: libssh2-devel
 BuildRequires: openssl-devel
+BuildRequires: pkgconfig
 %{?with_tests:BuildRequires:   python}
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -37,6 +44,8 @@ Summary:      Header files for libgit2 library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libgit2
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      http-parser-devel
+Requires:      libssh2-devel
 Requires:      openssl-devel
 Requires:      zlib-devel
 
@@ -49,14 +58,24 @@ Pliki nagłówkowe biblioteki libgit2.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
 cd build
-%cmake ..
+# CMakeLists.txt supports only relative LIB_INSTALL_DIR and INCLUDE_INSTALL_DIR
+# (otherwise .pc file is generated incorrectly).
+# 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 \
+       %{?with_kerberos5:-DUSE_GSSAPI:BOOL=ON}
 %{__make}
 
-%{?with_tests:%{__make} test}
+%{?with_tests:%{__make} test ARGS="-V"}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -73,7 +92,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS CONTRIBUTING.md COPYING README.md
 %attr(755,root,root) %{_libdir}/libgit2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgit2.so.0
+%attr(755,root,root) %ghost %{_libdir}/libgit2.so.23
 
 %files devel
 %defattr(644,root,root,755)
This page took 0.026373 seconds and 4 git commands to generate.