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