File mingw32-libgit2.spec of Package mingw32-libgit2
#
# spec file for package mingw32-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: mingw32-%{_basename}
Version: 0.22.2
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: http://libgit2.github.com/
Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz
Patch0: libgit2-0.21.2-ssp.patch
Patch1: libgit2-0.22.2-mingw.patch
BuildRequires: mingw32-cross-cmake
BuildRequires: mingw32-cross-binutils
BuildRequires: mingw32-cross-gcc
BuildRequires: mingw32-cross-pkg-config
BuildRequires: mingw32-filesystem
BuildRequires: mingw32-zlib-devel
BuildRequires: mingw32-libopenssl-devel
BuildRequires: mingw32-libssh2-devel
BuildRequires: python-base
%_mingw32_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: mingw32-libopenssl-devel
%description devel
This package contains all necessary include files and libraries needed
to compile and develop applications that use libgit2.
%_mingw32_debug_package
%prep
%setup -q -n %{_basename}-%{version}
%patch -P 0 -p1
%patch -P 1 -p1
%build
%{_mingw32_cmake} \
-DTHREADSAFE:BOOL=ON \
-DUSE_SSH:BOOL=ON \
-DWIN32:BOOL=ON \
-DMINGW:BOOL=ON
%{_mingw32_cmake_build}
%install
%{_mingw32_cmake_install}
%files
%defattr (-,root,root)
%doc AUTHORS COPYING README.md
%{_mingw32_bindir}/%{_basename}.dll
%files devel
%defattr (-,root,root)
%doc examples
%{_mingw32_libdir}/%{_basename}.dll.a
%{_mingw32_includedir}/git2*
%{_mingw32_libdir}/pkgconfig/libgit2.pc
%changelog