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