File messagelib.spec of Package messagelib

# spec file for package messagelib
# 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

%bcond_without lang

Name:           messagelib
Version:        17.04.2
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        KDE PIM library for e-mail message parsing and display
# FIXME: use correct group, see ""
License:        GPL-2.0 and GPL-3.0 and LGPL-2.1+
Group:          Development/Libraries
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  akonadi-contact-devel
BuildRequires:  akonadi-mime-devel
BuildRequires:  akonadi-search-devel
BuildRequires:  akonadi-server-devel
BuildRequires:  extra-cmake-modules
BuildRequires:  grantlee5-devel
BuildRequires:  grantleetheme-devel
BuildRequires:  karchive-devel
BuildRequires:  kcodecs-devel
BuildRequires:  kcompletion-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcontacts-devel
BuildRequires:  kdepim-apps-libs-devel
BuildRequires:  kdewebkit-devel >= 5.0
BuildRequires:  kf5-filesystem
BuildRequires:  ki18n-devel
BuildRequires:  kiconthemes-devel
BuildRequires:  kidentitymanagement-devel
BuildRequires:  kimap-devel
BuildRequires:  kitemviews-devel
BuildRequires:  kldap-devel
BuildRequires:  kmailtransport-devel
BuildRequires:  kmbox-devel
BuildRequires:  kmime-devel
BuildRequires:  kpimtextedit-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  libQt5Sql-private-headers-devel
BuildRequires:  libgpgme-devel
BuildRequires:  libgpgmepp-devel
BuildRequires:  libgravatar-devel
BuildRequires:  libkdepim-devel
BuildRequires:  libkleo-devel
BuildRequires:  libqgpgme-devel
BuildRequires:  pimcommon-devel
BuildRequires:  pkgconfig
BuildRequires:  syntax-highlighting-devel
BuildRequires:  pkgconfig(Qt5Concurrent) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Network) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Sql) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Test) >= 5.4.0
BuildRequires:  pkgconfig(Qt5UiTools) >= 5.4.0
BuildRequires:  pkgconfig(Qt5WebEngine) >= 5.4.0
BuildRequires:  pkgconfig(Qt5WebEngineWidgets) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.4.0
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
BuildRequires:  boost-devel
# It can only build on the same platforms as Qt Webengine
ExclusiveArch:  %ix86 x86_64 %arm aarch64 mips mips64
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This package contains the messagelib library. It is used by KDE PIM to parse and
display emails.

%if %{with lang}

%setup -q


%kf5_makeinstall -C build
%if %{with lang}
  %find_lang %{name} --with-man --all-name

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%package devel
Summary:        Library for messages
# FIXME: use correct group, see ""
License:        LGPL-2.1+
Group:          Development/Libraries
Requires:       %{name} = %{version}
Requires:       akonadi-mime-devel
Requires:       akonadi-server-devel
Requires:       kcontacts-devel
Requires:       kidentitymanagement-devel
Requires:       kmime-devel
Requires:       libkleo-devel
Requires:       messagelib-devel
Requires:       pimcommon-devel
%if 0%{?suse_version} > 1325
Requires:       libboost_headers-devel
Requires:       boost-devel

%description devel
This package contains source headers for messagelib.

%files devel

%config %{_kf5_configdir}/messagelib.categories
%config %{_kf5_configdir}/messageviewer_header_themes.knsrc
%config %{_kf5_configdir}/messagelib.renamecategories

%if %{with lang}
%files lang -f %{name}.lang