File gmime.spec of Package gmime
#
# spec file for package gmime
#
# 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/
#
# Define a base version
%define base_ver 3.0
# Define a so version
# NOTE - also update baselibs.conf when bumping this
%define so_ver 3_0
Name: gmime
Version: 3.0.3
Release: 0
Url: http://spruce.sourceforge.net/gmime/
Summary: MIME Parser and Utility Library
License: LGPL-2.1+
Group: Productivity/Networking/Email/Utilities
Source: http://download.gnome.org/sources/gmime/3.0/%{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM gmime-fix-build-failure.patch bgo#789799 fezhang@suse.com -- Fix a build failure
Patch0: gmime-fix-build-failure.patch
BuildRequires: gobject-introspection-devel >= 1.30.0
BuildRequires: gpgme-devel
BuildRequires: gtk-doc
BuildRequires: zlib-devel
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libidn) >= 0.0.0
BuildRequires: pkgconfig(vapigen)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GMime is a C/C++ library for parsing and creating messages using
the Multipurpose Internet Mail Extension (MIME).
%package -n libgmime-%{so_ver}-0
Summary: MIME Parser and Utility Library
Group: System/Libraries
%description -n libgmime-%{so_ver}-0
GMime is a C/C++ library for parsing and creating messages using
the Multipurpose Internet Mail Extension (MIME).
%package -n typelib-1_0-GMime-%{so_ver}
Summary: MIME Parser and Utility Library -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-GMime-%{so_ver}
GMime is a C/C++ library for parsing and creating messages using
the Multipurpose Internet Mail Extension (MIME).
%package devel
Summary: MIME Parser and Utility Library -- Development Files
Group: Development/Libraries/C and C++
Requires: libgmime-%{so_ver}-0 = %{version}
%description devel
GMime is a C/C++ library for parsing and creating messages using
the Multipurpose Internet Mail Extension (MIME).
%prep
%setup -q
%patch0 -p1
%build
%configure\
--enable-largefile\
--disable-static\
--enable-gtk-doc \
--enable-crypto \
--with-gacdir=%{_prefix}/lib
make %{?_smp_mflags}
%install
%makeinstall
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
%post -n libgmime-%{so_ver}-0 -p /sbin/ldconfig
%postun -n libgmime-%{so_ver}-0 -p /sbin/ldconfig
%files -n libgmime-%{so_ver}-0
%defattr (-, root, root)
%doc COPYING
%{_libdir}/*.so.*
%files -n typelib-1_0-GMime-%{so_ver}
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GMime-%{base_ver}.typelib
%files devel
%defattr (-, root, root)
%doc AUTHORS PORTING README TODO
%{_datadir}/gir-1.0/GMime-%{base_ver}.gir
%{_includedir}/gmime-%{base_ver}
%{_libdir}/*.so
%{_libdir}/pkgconfig/gmime-%{base_ver}.pc
%{_datadir}/gtk-doc/html/gmime-%{base_ver}/
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/gmime-3.0.deps
%{_datadir}/vala/vapi/gmime-3.0.vapi
%changelog