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