]> git.pld-linux.org Git - packages/libgit2.git/blame - libgit2.spec
- updated to 1.2.0 (new soname)
[packages/libgit2.git] / libgit2.spec
CommitLineData
e02620dc
KK
1#
2# Conditional build:
5a6c8e52 3%bcond_without kerberos5 # GSSAPI for SPNEGO auth
ce3c8080 4%bcond_without libssh # SSH support via libssh2
2be19a6f 5%bcond_with tests # build without tests
3ed59b63 6
bed40d56
ER
7Summary: C Git library
8Summary(pl.UTF-8): Biblioteka Git dla C
e02620dc 9Name: libgit2
e7b8c419 10Version: 1.2.0
1248fe93 11Release: 1
3ed59b63 12License: GPL v2 with linking exception
e02620dc 13Group: Libraries
ce3c8080 14#Source0Download: https://github.com/libgit2/libgit2/releases
cfe22010 15Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
e7b8c419 16# Source0-md5: 72825e8dc26c7360910a9dee070b8122
915109a7 17Patch0: %{name}-no-libgit2-test.patch
e02620dc 18URL: http://libgit2.github.com/
6d435468 19BuildRequires: cmake >= 3.5.1
5a6c8e52
JB
20%{?with_kerberos5:BuildRequires: heimdal-devel}
21BuildRequires: http-parser-devel >= 2
f967805f 22%{?with_libssh:BuildRequires: libssh2-devel}
e02620dc 23BuildRequires: openssl-devel
6d435468 24BuildRequires: pcre-devel
5a6c8e52 25BuildRequires: pkgconfig
e02620dc 26%{?with_tests:BuildRequires: python}
3bd4ac36 27BuildRequires: rpmbuild(macros) >= 1.742
e02620dc
KK
28BuildRequires: zlib-devel
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32libgit2 is a portable, pure C implementation of the Git core methods
33provided as a re-entrant linkable library with a solid API, allowing
34you to write native speed custom Git applications in any language with
35bindings.
36
6053f043
JB
37%description -l pl.UTF-8
38libgit2 to przenośna implementacja w czystym C głównych metod Gita,
39udostępniona jako bezpieczna dla wątków biblioteka ze stałym API,
40pozwalająca na pisanie własnych aplikacji dla Gita o natywnej
41szybkości w dowolnym języku posiadającym odpowiednie wiązania.
42
e02620dc 43%package devel
6053f043
JB
44Summary: Header files for libgit2 library
45Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgit2
e02620dc
KK
46Group: Development/Libraries
47Requires: %{name} = %{version}-%{release}
b96b78fd
JB
48Requires: http-parser-devel
49Requires: libssh2-devel
6053f043
JB
50Requires: openssl-devel
51Requires: zlib-devel
e02620dc
KK
52
53%description devel
6053f043
JB
54Header files for libgit2 library.
55
56%description devel -l pl.UTF-8
57Pliki nagłówkowe biblioteki libgit2.
e02620dc
KK
58
59%prep
60%setup -q
3c0e613e 61%patch0 -p1
915109a7
AM
62
63# Don't test network
c2bb0da7 64sed -i '/ADD_TEST(online/s/^/#/' tests/CMakeLists.txt
e02620dc
KK
65
66%build
3ed59b63 67install -d build
e02620dc 68cd build
b96b78fd
JB
69# CMakeLists.txt supports only relative LIB_INSTALL_DIR and INCLUDE_INSTALL_DIR
70# (otherwise .pc file is generated incorrectly).
71# Type (:PATH or :STRING) must be specified explicitly to avoid expansion
72# relative to cwd.
43bce41a 73%cmake .. \
b96b78fd
JB
74 -DINCLUDE_INSTALL_DIR:PATH=include \
75 -DLIB_INSTALL_DIR:PATH=%{_lib} \
ce3c8080 76 %{cmake_on_off tests BUILD_CLAR} \
ce3c8080
JB
77 %{cmake_on_off kerberos5 USE_GSSAPI} \
78 %{cmake_on_off libssh USE_SSH} \
6d435468 79 -DUSE_HTTP_PARSER=system \
f967805f 80 -DTHREADSAFE:BOOL=ON
e02620dc
KK
81%{__make}
82
d1549dd1 83%{?with_tests:%{__make} test ARGS="-V"}
e02620dc
KK
84
85%install
86rm -rf $RPM_BUILD_ROOT
3ed59b63 87%{__make} -C build install \
e02620dc
KK
88 DESTDIR=$RPM_BUILD_ROOT
89
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%post -p /sbin/ldconfig
94%postun -p /sbin/ldconfig
95
e02620dc
KK
96%files
97%defattr(644,root,root,755)
76a2bdaf 98%doc AUTHORS docs/contributing.md COPYING README.md
e02620dc 99%attr(755,root,root) %{_libdir}/libgit2.so.*.*.*
e7b8c419 100%attr(755,root,root) %ghost %{_libdir}/libgit2.so.1.2
e02620dc
KK
101
102%files devel
103%defattr(644,root,root,755)
104%attr(755,root,root) %{_libdir}/libgit2.so
105%{_includedir}/git2.h
106%{_includedir}/git2
107%{_pkgconfigdir}/libgit2.pc
This page took 0.065238 seconds and 4 git commands to generate.