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