]>
Commit | Line | Data |
---|---|---|
e02620dc KK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
3ed59b63 | 4 | |
e02620dc KK |
5 | Summary: C git library |
6 | Name: libgit2 | |
7 | Version: 0.18.0 | |
3ed59b63 ER |
8 | Release: 1 |
9 | License: GPL v2 with linking exception | |
e02620dc | 10 | Group: Libraries |
e02620dc KK |
11 | Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz?/%{name}-version.tgz |
12 | # Source0-md5: ce6845df0dd084ef2633a69dba64929c | |
13 | URL: http://libgit2.github.com/ | |
14 | BuildRequires: cmake >= 2.6 | |
15 | BuildRequires: openssl-devel | |
16 | %{?with_tests:BuildRequires: python} | |
17 | BuildRequires: zlib-devel | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | libgit2 is a portable, pure C implementation of the Git core methods | |
22 | provided as a re-entrant linkable library with a solid API, allowing | |
23 | you to write native speed custom Git applications in any language with | |
24 | bindings. | |
25 | ||
26 | %package devel | |
27 | Summary: Header files for %{name} library | |
28 | Group: Development/Libraries | |
29 | Requires: %{name} = %{version}-%{release} | |
30 | ||
31 | %description devel | |
32 | Header files for %{name} library. | |
33 | ||
34 | %prep | |
35 | %setup -q | |
36 | ||
37 | %build | |
3ed59b63 | 38 | install -d build |
e02620dc KK |
39 | cd build |
40 | %cmake .. | |
41 | %{__make} | |
42 | ||
43 | %{?with_tests:%{__make} test} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
3ed59b63 | 47 | %{__make} -C build install \ |
e02620dc KK |
48 | DESTDIR=$RPM_BUILD_ROOT |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %post -p /sbin/ldconfig | |
54 | %postun -p /sbin/ldconfig | |
55 | ||
e02620dc KK |
56 | %files |
57 | %defattr(644,root,root,755) | |
58 | %doc AUTHORS CONTRIBUTING.md COPYING README.md | |
59 | %attr(755,root,root) %{_libdir}/libgit2.so.*.*.* | |
3ed59b63 | 60 | %ghost %{_libdir}/libgit2.so.0 |
e02620dc KK |
61 | |
62 | %files devel | |
63 | %defattr(644,root,root,755) | |
64 | %attr(755,root,root) %{_libdir}/libgit2.so | |
65 | %{_includedir}/git2.h | |
66 | %{_includedir}/git2 | |
67 | %{_pkgconfigdir}/libgit2.pc |