libgit2/libgit2.spec

89 lines
2.2 KiB
RPMSpec
Raw Normal View History

%define major 24
%define libname %mklibname git2_ %{major}
%define devname %mklibname git2 -d
Summary: A C implementation of the Git core methods as a library
Name: libgit2
Version: 0.24.1
2017-02-04 19:18:03 +03:00
Release: 3
License: GPLv2 with exceptions
Group: System/Libraries
Url: http://libgit2.github.com/
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: http-parser-devel
2015-04-07 19:57:58 +03:00
BuildRequires: pkgconfig(libssh2)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
%description
libgit2 is a portable, pure C implementation of the Git core methods
provided as a re-entrant linkable library with a solid API, allowing
you to write native speed custom Git applications in any language
with bindings.
#----------------------------------------------------------------------------
%package -n %{libname}
Summary: A C implementation of the Git core methods as a library
Group: System/Libraries
%description -n %{libname}
libgit2 is a portable, pure C implementation of the Git core methods
provided as a re-entrant linkable library with a solid API, allowing
you to write native speed custom Git applications in any language
with bindings.
%files -n %{libname}
%doc README.md COPYING AUTHORS
%{_libdir}/libgit2.so.%{major}
%{_libdir}/libgit2.so.0.%{major}.*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Development files for %{name}
Group: Development/C
Requires: %{libname} = %{EVRD}
%description -n %{devname}
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%files -n %{devname}
%doc docs examples
%{_libdir}/libgit2.so
%{_libdir}/pkgconfig/libgit2.pc
%{_includedir}/git2*
#----------------------------------------------------------------------------
%prep
%setup -q
%apply_patches
# Remove VCS files from examples
find examples -name ".gitignore" -delete
# Fix pkgconfig generation
sed -i 's|@CMAKE_INSTALL_PREFIX@/||' libgit2.pc.in
# Don't test network
sed -i 's/ionline/xonline/' CMakeLists.txt
# Remove bundled libraries
rm -rf deps
#rm -rf src/xdiff
%build
2015-04-07 19:57:58 +03:00
%cmake \
-DTHREADSAFE:BOOL=ON \
-DUSE_SSH:BOOL=ON
%make
%install
%makeinstall_std -C build
%check
ctest -V