3 %bcond_without tests # build without tests
4 %bcond_with tests_online # build with tests reqiuring online access
7 Summary(pl.UTF-8): Biblioteka git dla C
11 License: GPL v2 with linking exception
13 Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
14 # Source0-md5: e35f613a37e11354f34249f2faa68237
15 Patch0: %{name}-test-online.patch
16 Patch1: %{name}-no-libgit2-test.patch
17 URL: http://libgit2.github.com/
18 BuildRequires: cmake >= 2.6
19 BuildRequires: http-parser-devel
20 BuildRequires: libssh2-devel
21 BuildRequires: openssl-devel
22 %{?with_tests:BuildRequires: python}
23 BuildRequires: zlib-devel
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 libgit2 is a portable, pure C implementation of the Git core methods
28 provided as a re-entrant linkable library with a solid API, allowing
29 you to write native speed custom Git applications in any language with
32 %description -l pl.UTF-8
33 libgit2 to przenośna implementacja w czystym C głównych metod Gita,
34 udostępniona jako bezpieczna dla wątków biblioteka ze stałym API,
35 pozwalająca na pisanie własnych aplikacji dla Gita o natywnej
36 szybkości w dowolnym języku posiadającym odpowiednie wiązania.
39 Summary: Header files for libgit2 library
40 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgit2
41 Group: Development/Libraries
42 Requires: %{name} = %{version}-%{release}
43 Requires: openssl-devel
47 Header files for libgit2 library.
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe biblioteki libgit2.
61 %{?with_tests_online:-DONLINE_TESTS=1}
64 %{?with_tests:%{__make} test ARGS="-V"}
67 rm -rf $RPM_BUILD_ROOT
68 %{__make} -C build install \
69 DESTDIR=$RPM_BUILD_ROOT
72 rm -rf $RPM_BUILD_ROOT
74 %post -p /sbin/ldconfig
75 %postun -p /sbin/ldconfig
78 %defattr(644,root,root,755)
79 %doc AUTHORS CONTRIBUTING.md COPYING README.md
80 %attr(755,root,root) %{_libdir}/libgit2.so.*.*.*
81 %attr(755,root,root) %ghost %{_libdir}/libgit2.so.0
84 %defattr(644,root,root,755)
85 %attr(755,root,root) %{_libdir}/libgit2.so
88 %{_pkgconfigdir}/libgit2.pc