]>
Commit | Line | Data |
---|---|---|
e02620dc KK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
c1bf3b60 | 4 | %bcond_with tests_online # build with tests reqiuring online access |
3ed59b63 | 5 | |
e02620dc | 6 | Summary: C git library |
6053f043 | 7 | Summary(pl.UTF-8): Biblioteka git dla C |
e02620dc | 8 | Name: libgit2 |
8a14caad | 9 | Version: 0.20.0 |
3ed59b63 ER |
10 | Release: 1 |
11 | License: GPL v2 with linking exception | |
e02620dc | 12 | Group: Libraries |
43bce41a | 13 | Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz |
8a14caad | 14 | # Source0-md5: e35f613a37e11354f34249f2faa68237 |
43bce41a | 15 | Patch0: %{name}-test-online.patch |
e02620dc KK |
16 | URL: http://libgit2.github.com/ |
17 | BuildRequires: cmake >= 2.6 | |
3c0e613e | 18 | BuildRequires: http-parser-devel |
43bce41a | 19 | BuildRequires: libssh2-devel |
e02620dc KK |
20 | BuildRequires: openssl-devel |
21 | %{?with_tests:BuildRequires: python} | |
22 | BuildRequires: zlib-devel | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | libgit2 is a portable, pure C implementation of the Git core methods | |
27 | provided as a re-entrant linkable library with a solid API, allowing | |
28 | you to write native speed custom Git applications in any language with | |
29 | bindings. | |
30 | ||
6053f043 JB |
31 | %description -l pl.UTF-8 |
32 | libgit2 to przenośna implementacja w czystym C głównych metod Gita, | |
33 | udostępniona jako bezpieczna dla wątków biblioteka ze stałym API, | |
34 | pozwalająca na pisanie własnych aplikacji dla Gita o natywnej | |
35 | szybkości w dowolnym języku posiadającym odpowiednie wiązania. | |
36 | ||
e02620dc | 37 | %package devel |
6053f043 JB |
38 | Summary: Header files for libgit2 library |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgit2 | |
e02620dc KK |
40 | Group: Development/Libraries |
41 | Requires: %{name} = %{version}-%{release} | |
6053f043 JB |
42 | Requires: openssl-devel |
43 | Requires: zlib-devel | |
e02620dc KK |
44 | |
45 | %description devel | |
6053f043 JB |
46 | Header files for libgit2 library. |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pliki nagłówkowe biblioteki libgit2. | |
e02620dc KK |
50 | |
51 | %prep | |
52 | %setup -q | |
3c0e613e | 53 | %patch0 -p1 |
e02620dc KK |
54 | |
55 | %build | |
3ed59b63 | 56 | install -d build |
e02620dc | 57 | cd build |
43bce41a JB |
58 | %cmake .. \ |
59 | %{?with_tests_online:-DONLINE_TESTS=1} | |
e02620dc KK |
60 | %{__make} |
61 | ||
d1549dd1 | 62 | %{?with_tests:%{__make} test ARGS="-V"} |
e02620dc KK |
63 | |
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
3ed59b63 | 66 | %{__make} -C build install \ |
e02620dc KK |
67 | DESTDIR=$RPM_BUILD_ROOT |
68 | ||
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %post -p /sbin/ldconfig | |
73 | %postun -p /sbin/ldconfig | |
74 | ||
e02620dc KK |
75 | %files |
76 | %defattr(644,root,root,755) | |
77 | %doc AUTHORS CONTRIBUTING.md COPYING README.md | |
78 | %attr(755,root,root) %{_libdir}/libgit2.so.*.*.* | |
6053f043 | 79 | %attr(755,root,root) %ghost %{_libdir}/libgit2.so.0 |
e02620dc KK |
80 | |
81 | %files devel | |
82 | %defattr(644,root,root,755) | |
83 | %attr(755,root,root) %{_libdir}/libgit2.so | |
84 | %{_includedir}/git2.h | |
85 | %{_includedir}/git2 | |
86 | %{_pkgconfigdir}/libgit2.pc |