]> git.pld-linux.org Git - packages/libgit2.git/blobdiff - libgit2.spec
- disable tests
[packages/libgit2.git] / libgit2.spec
index 170d67cda789debb4ffecdf1be3848450050f1ae..911be91acb3f9d9ba3c25d2e39ce0ebf885492e9 100644 (file)
@@ -3,23 +3,21 @@
 %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.3
-Release:       1
+Version:       1.0.0
+Release:       0.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: df626711b16bd5e7021123cbf1655399
-Patch0:                %{name}-test-online.patch
-Patch1:                %{name}-no-libgit2-test.patch
+# Source0-md5: 5ce9b630203573e544d663cbd750040f
+Patch0:                %{name}-no-libgit2-test.patch
 URL:           http://libgit2.github.com/
-BuildRequires: cmake >= 2.8
+BuildRequires: cmake >= 3.0
 %{?with_curl:BuildRequires:    curl-devel}
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
 BuildRequires: http-parser-devel >= 2
@@ -27,12 +25,10 @@ BuildRequires:      http-parser-devel >= 2
 BuildRequires: openssl-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
@@ -64,7 +60,9 @@ Pliki nagłówkowe 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
@@ -80,7 +78,6 @@ cd build
        %{cmake_on_off curl CURL} \
        %{cmake_on_off kerberos5 USE_GSSAPI} \
        %{cmake_on_off libssh USE_SSH} \
-       %{cmake_on_off tests_online ONLINE_TESTS} \
        -DTHREADSAFE:BOOL=ON
 %{__make}
 
@@ -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.0
 
 %files devel
 %defattr(644,root,root,755)
This page took 0.057009 seconds and 4 git commands to generate.