File mingw64-libvmime.spec of Package mingw64-libvmime

#
# spec file for package mingw64-libvmime
#
# Copyright (c) 2017 SUSE LINUX 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-libvmime
%define lname	mingw64-libvmime1
Summary:        Library for working with RFC 2822, MIME messages and IMAP/POP/SMTP
License:        GPL-3.0-or-later
Group:          Development/Libraries/C and C++
Version:        0.9.2.g175
Release:        0
Url:            http://vmime.org/

#Source:         https://github.com/kisli/vmime/archive/v%version.tar.gz
Source:         vmime-%version.tar.xz
Patch1:         libvmime-nodatetime.diff
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-libgnutls-devel
BuildRequires:  mingw64-libgsasl-devel
BuildRequires:  mingw64-libressl-devel
BuildRequires:  mingw64-win_iconv-devel
BuildRequires:  xz
%_mingw64_package_header_debug
BuildArch:      noarch
#!BuildIgnore:	post-build-checks

%description
VMime is a C++ class library for working with MIME messages and
Internet messaging services like IMAP, POP or SMTP.

%package -n %lname
Summary:        Library for working with MIME messages and IMAP/POP/SMTP
Group:          System/Libraries

%description -n %lname
VMime is a C++ class library for working with MIME messages and
Internet messaging services like IMAP, POP or SMTP.

%package devel
Summary:        Library for working with MIME messages and IMAP/POP/SMTP
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
VMime is a C++ class library for working with MIME messages and
Internet messaging services like IMAP, POP or SMTP.

%_mingw64_debug_package

%prep
%setup -qn vmime-%version
%patch -P 1 -p1

%build
MINGW64_CFLAGS="%_mingw64_cflags -DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1 -Wno-return-type"
MINGW64_CXXFLAGS="%_mingw64_cxxflags -DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1 -std=gnu++11 -Wno-return-type"
%_mingw64_cmake \
        -DVMIME_SENDMAIL_PATH:STRING="%_sbindir/sendmail" \
        -DVMIME_BUILD_SAMPLES:BOOL=OFF \
        -DVMIME_HAVE_TLS_SUPPORT:BOOL=ON \
        -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \
        -DVMIME_BUILD_SHARED_LIBRARY:BOOL=ON \
        -DVMIME_BUILD_DOCUMENTATION:BOOL=OFF
%_mingw64_cmake_build

%install
%_mingw64_cmake_install

%files -n %lname
%defattr(-,root,root)
%doc COPYING
%_mingw64_bindir/libvmime.dll

%files devel
%defattr(-,root,root)
%_mingw64_includedir/vmime/
%_mingw64_libdir/*

%changelog
openSUSE Build Service is sponsored by