File mingw64-libgit2.spec of Package mingw64-libgit2
#
# spec file for package mingw64-libgit2
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _basename libgit2
Name: mingw64-%{_basename}
Version: 1.9.0
Release: 0
#!BuildIgnore: post-build-checks
Summary: C git library
License: GPL-2.0-only WITH GCC-exception-2.0
Group: Development/Libraries/C and C++
URL: https://libgit2.github.com/
Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz#/%{_basename}-%{version}.tar.gz
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-zlib-devel
BuildRequires: mingw64-libopenssl-devel
BuildRequires: mingw64-libssh2-devel
BuildRequires: mingw64-pcre2-devel
BuildRequires: python3-base
%_mingw64_package_header_debug
BuildArch: noarch
%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 devel
Summary: C git library
Group: Development/Libraries/C and C++
Requires: %name = %version
Requires: mingw64-libopenssl-devel
%description devel
This package contains all necessary include files and libraries needed
to compile and develop applications that use libgit2.
%_mingw64_debug_package
%prep
%autosetup -n %{_basename}-%{version}
%build
%{_mingw64_cmake} \
-DDLLTOOL=%{_bindir}/x86_64-w64-mingw32-dlltool \
-DTHREADSAFE:BOOL=ON \
-DUSE_SSH:BOOL=ON \
-DREGEX_BACKEND=pcre2 \
-DENABLE_REPRODUCIBLE_BUILDS:BOOL=ON \
-DWIN32:BOOL=ON \
-DMINGW:BOOL=ON
%{_mingw64_cmake_build}
%install
%{_mingw64_cmake_install}
%files
%license COPYING
%doc README.md
%{_mingw64_bindir}/%{_basename}.dll
%files devel
%doc examples
%{_mingw64_bindir}/git2.exe
%{_mingw64_includedir}/git2*
%{_mingw64_libdir}/%{_basename}.dll.a
%{_mingw64_libdir}/pkgconfig/libgit2.pc
%{_mingw64_libdir}/cmake/libgit2
%changelog