]> git.pld-linux.org Git - packages/libgit2.git/blobdiff - libgit2.spec
- enable THREADSAFE; release 3
[packages/libgit2.git] / libgit2.spec
index 831115f99f8e87117228b4d10a8883ac57f927aa..e49df504d017b5fee1d281b90c417cb289854451 100644 (file)
@@ -1,20 +1,23 @@
 #
 # Conditional build:
 %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
-Release:       1
+Version:       0.20.0
+Release:       3
 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}.tar.gz?/%{name}-%{version}.tar.gz
+# Source0-md5: e35f613a37e11354f34249f2faa68237
+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: libssh2-devel
 BuildRequires: openssl-devel
 %{?with_tests:BuildRequires:   python}
 BuildRequires: zlib-devel
@@ -37,6 +40,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,11 +54,20 @@ 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
 %{__make}
 
 %{?with_tests:%{__make} test ARGS="-V"}
This page took 0.206541 seconds and 4 git commands to generate.