File mingw64-libgcrypt.spec of Package mingw64-libgcrypt

#
# spec file for package mingw64-libgcrypt
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#


Name:           mingw64-libgcrypt
Version:        1.8.9
Release:        0
Summary:        MinGW Windows gcrypt encryption library
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
Url:            ftp://ftp.gnupg.org/gcrypt/libgcrypt/
Source:         ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2
Source2:        ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig
Source3:        %name.keyring
Patch1:         libgcrypt-1.5.2-deffile.patch
Patch2:         libgcrypt-1.6.5-w32-thread-fix.patch
#!BuildIgnore: post-build-checks
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-libgpg-error-devel >= 1.20
%_mingw64_package_header_debug
BuildArch:      noarch

%description
MinGW Windows gcrypt encryption library.

%package -n mingw64-libgcrypt20
Summary:        MinGW Windows port of the gcrypt cryptograph library
Group:          System/Libraries
Obsoletes:      mingw64-libgcrypt

%description -n mingw64-libgcrypt20
MinGW Windows gcrypt encryption library.

%package devel
Summary:        MinGW Windows gcrypt encryption library (development files)
Group:          Development/Libraries/C and C++

%description devel
MinGW Windows gcrypt encryption library (development files).

%_mingw64_debug_package

%prep
%setup -q -n libgcrypt-%{version}
%patch -P 1 -p1 -b .deffile
%patch -P 2 -p1

%build
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
PATH="%{_mingw64_bindir}:$PATH" \
%{_mingw64_configure} \
	--enable-shared --disable-static
make %{?_smp_mflags} || make

%install

make DESTDIR=%{buildroot} install %{?_smp_mflags}

%files -n mingw64-libgcrypt20
%defattr(-,root,root)
%{_mingw64_bindir}/libgcrypt-20.dll

%files devel
%defattr(-,root,root)
%{_mingw64_bindir}/dumpsexp.exe
%{_mingw64_bindir}/hmac256.exe
%{_mingw64_bindir}/mpicalc.exe
%{_mingw64_bindir}/libgcrypt-config
%{_mingw64_libdir}/libgcrypt.def
%{_mingw64_libdir}/libgcrypt.dll.a
%{_mingw64_infodir}
%{_mingw64_includedir}/gcrypt.h
%{_mingw64_datadir}/aclocal/libgcrypt.m4
%{_mingw64_mandir}/man1/hmac256.1*
%{_mingw64_libdir}/pkgconfig/libgcrypt.pc

%changelog
openSUSE Build Service is sponsored by