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