libgit2/libgit2.spec

85 lines
2.2 KiB
RPMSpec
Raw Normal View History

2022-11-13 02:41:39 +03:00
%define major 1.5
%define libname %mklibname git2_ %{major}
%define devname %mklibname git2 -d
Summary: A C implementation of the Git core methods as a library
Name: libgit2
2023-07-18 22:51:42 +00:00
Version: 1.7.0
2023-02-28 13:39:27 +00:00
Release: 1
License: GPLv2 with exceptions
Group: System/Libraries
2022-11-13 02:41:39 +03:00
URL: https://libgit2.org
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
2022-03-18 19:07:29 +03:00
BuildRequires: pkgconfig(krb5-gssapi)
BuildRequires: pkgconfig(libpcre)
2015-04-07 19:57:58 +03:00
BuildRequires: pkgconfig(libssh2)
2022-11-13 03:21:42 +03:00
#BuildRequires: pkgconfig(openssl)
BuildRequires: openssl-devel
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
2022-11-13 03:38:51 +03:00
%{_bindir}/git2_cli
%{_libdir}/libgit2.so.%{major}
2022-03-18 19:07:29 +03:00
%{_libdir}/libgit2.so.%{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}
2022-11-13 02:41:39 +03:00
%doc AUTHORS docs examples README.md SECURITY.md COPYING
%{_libdir}/libgit2.so
%{_libdir}/pkgconfig/libgit2.pc
%{_includedir}/git2*
#----------------------------------------------------------------------------
%prep
2022-11-13 03:21:42 +03:00
%setup -q
# Remove VCS files from examples
find examples -name ".gitignore" -delete
2022-03-18 19:07:29 +03:00
# Remove some bundled libraries
rm -rf deps/{chromium-zlib,pcre,winhttp,zlib}
#rm -rf src/xdiff
%build
2015-04-07 19:57:58 +03:00
%cmake \
2022-03-18 19:07:29 +03:00
-DBUILD_TESTS=OFF \
-DUSE_SSH=ON
2020-01-13 15:44:35 +03:00
%make
%install
2020-01-13 15:44:35 +03:00
%makeinstall_std -C build
%check
ctest -V