File kmailtransport.spec of Package kmailtransport

#
# spec file for package kmailtransport
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


%define kf5_version 5.19.0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
%{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
%bcond_without lang
Name:           kmailtransport
Version:        19.04.0
Release:        0
Summary:        KDE PIM Libraries: Mailtransport layer
License:        LGPL-2.1-or-later
Group:          System/GUI/KDE
URL:            http://www.kde.org
Source:         kmailtransport-%{version}.tar.xz
BuildRequires:  akonadi-mime-devel
BuildRequires:  akonadi-server-devel
BuildRequires:  cyrus-sasl-devel
BuildRequires:  extra-cmake-modules >= 5.19.0
BuildRequires:  kcmutils-devel >= %{kf5_version}
BuildRequires:  kconfigwidgets-devel >= %{kf5_version}
BuildRequires:  kf5-filesystem
BuildRequires:  kmime-devel
BuildRequires:  ksmtp-devel
BuildRequires:  kwallet-devel >= %{kf5_version}
BuildRequires:  libkgapi-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Test)
Recommends:     %{name}-lang

%description
This package contains library to provide mailtransport functionality for KDE PIM applications.

%package -n libKF5MailTransport5
Summary:        Mail Transport library for KDEPIM
Group:          System/Libraries
Requires:       %{name} >= %{version}
Requires:       sasl2-kdexoauth2 >= %{_kapp_version}

%description -n libKF5MailTransport5
The Mail Transport library for KDEPIM functionality

%package -n libKF5MailTransportAkonadi5
Summary:        libkdepim Akonadi library
Group:          System/Libraries
Requires:       %{name} >= %{version}

%description -n libKF5MailTransportAkonadi5
The Mail Transport library for Akonadi related functions

%post -n libKF5MailTransport5  -p /sbin/ldconfig
%postun -n libKF5MailTransport5 -p /sbin/ldconfig
%post -n libKF5MailTransportAkonadi5  -p /sbin/ldconfig
%postun -n libKF5MailTransportAkonadi5 -p /sbin/ldconfig

%package devel
Summary:        KDE PIM Libraries: Build Environment
Group:          Development/Libraries/KDE
Requires:       akonadi-mime-devel
Requires:       cyrus-sasl-devel
Requires:       kmime-devel
Requires:       kwallet-devel >= %{kf5_version}
Requires:       libKF5MailTransport5 = %{version}
Requires:       libKF5MailTransportAkonadi5 = %{version}

%description devel
This package contains necessary include files and libraries needed
to develop KDE PIM applications.

%lang_package

%prep
%setup -q -n kmailtransport-%{version}

%build
  %cmake_kf5 -d build -- -DBUILD_TESTING=OFF -DKF5_INCLUDE_INSTALL_DIR=%{_kf5_includedir}
  %make_jobs

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

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

%files
%license COPYING*
%dir %{_kf5_configkcfgdir}
%config %{_kf5_configdir}/kmailtransport.categories
%config %{_kf5_configdir}/kmailtransport.renamecategories
%dir %{_kf5_plugindir}/mailtransport
%{_kf5_configkcfgdir}/mailtransport.kcfg
%{_kf5_plugindir}/kcm_mailtransport.so
%{_kf5_plugindir}/mailtransport/*.so
%{_kf5_servicesdir}/kcm_mailtransport.desktop

%files -n libKF5MailTransport5
%license COPYING*
%{_kf5_libdir}/libKF5MailTransport.so.5*

%files -n libKF5MailTransportAkonadi5
%license COPYING*
%{_kf5_libdir}/libKF5MailTransportAkonadi.so.5*

%files devel
%license COPYING*
%{_kf5_cmakedir}/KF5MailTransport/
%{_kf5_includedir}/MailTransport/
%{_kf5_includedir}/MailTransportAkonadi/
%{_kf5_includedir}/mailtransport/
%{_kf5_includedir}/mailtransport_version.h
%{_kf5_includedir}/mailtransportakonadi/
%{_kf5_includedir}/mailtransportakonadi_version.h
%{_kf5_libdir}/libKF5MailTransport.so
%{_kf5_libdir}/libKF5MailTransportAkonadi.so
%{_kf5_mkspecsdir}/qt_KMailTransport.pri
%{_kf5_mkspecsdir}/qt_KMailTransportAkonadi.pri
%{_kf5_libdir}/cmake/KF5MailTransportAkonadi/

%if %{with lang}
%files lang -f %{name}.lang
%license COPYING*
%endif

%changelog
openSUSE Build Service is sponsored by