]> git.pld-linux.org Git - packages/libgit2.git/blame - libgit2.spec
- updated to 0.23.4
[packages/libgit2.git] / libgit2.spec
CommitLineData
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 7Summary: C git library
6053f043 8Summary(pl.UTF-8): Biblioteka git dla C
e02620dc 9Name: libgit2
a648c11f 10Version: 0.23.4
cfe22010 11Release: 1
3ed59b63 12License: GPL v2 with linking exception
e02620dc 13Group: Libraries
cfe22010 14Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
a648c11f 15# Source0-md5: b7db3ab71dfa19fe1dc7fef76d6af216
43bce41a 16Patch0: %{name}-test-online.patch
6bc0cd1c 17Patch1: %{name}-no-libgit2-test.patch
e02620dc 18URL: http://libgit2.github.com/
5a6c8e52
JB
19BuildRequires: cmake >= 2.8
20BuildRequires: curl-devel
21%{?with_kerberos5:BuildRequires: heimdal-devel}
22BuildRequires: http-parser-devel >= 2
43bce41a 23BuildRequires: libssh2-devel
e02620dc 24BuildRequires: openssl-devel
5a6c8e52 25BuildRequires: pkgconfig
e02620dc
KK
26%{?with_tests:BuildRequires: python}
27BuildRequires: zlib-devel
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31libgit2 is a portable, pure C implementation of the Git core methods
32provided as a re-entrant linkable library with a solid API, allowing
33you to write native speed custom Git applications in any language with
34bindings.
35
6053f043
JB
36%description -l pl.UTF-8
37libgit2 to przenośna implementacja w czystym C głównych metod Gita,
38udostępniona jako bezpieczna dla wątków biblioteka ze stałym API,
39pozwalająca na pisanie własnych aplikacji dla Gita o natywnej
40szybkości w dowolnym języku posiadającym odpowiednie wiązania.
41
e02620dc 42%package devel
6053f043
JB
43Summary: Header files for libgit2 library
44Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libgit2
e02620dc
KK
45Group: Development/Libraries
46Requires: %{name} = %{version}-%{release}
b96b78fd
JB
47Requires: http-parser-devel
48Requires: libssh2-devel
6053f043
JB
49Requires: openssl-devel
50Requires: zlib-devel
e02620dc
KK
51
52%description devel
6053f043
JB
53Header files for libgit2 library.
54
55%description devel -l pl.UTF-8
56Pliki 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 64install -d build
e02620dc 65cd 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
81rm -rf $RPM_BUILD_ROOT
3ed59b63 82%{__make} -C build install \
e02620dc
KK
83 DESTDIR=$RPM_BUILD_ROOT
84
85%clean
86rm -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
This page took 0.117185 seconds and 4 git commands to generate.