File ksmtp.spec of Package ksmtp
#
# spec file for package ksmtp
#
# Copyright (c) 2018 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/
#
%bcond_without lang
Name: ksmtp
Version: 17.12.3
Release: 0
Summary: Job-based library to send email through an SMTP server
License: LGPL-2.1-or-later
Group: System/GUI/KDE
Url: http://www.kde.org
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM
Patch0: increase-smtp-timeout-session.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-KSMTP-Fix-sending-emails-where-a-line-starts-with-a-.patch
BuildRequires: cyrus-sasl-devel
BuildRequires: extra-cmake-modules >= 1.0.0
BuildRequires: kcoreaddons-devel
BuildRequires: kf5-filesystem
BuildRequires: ki18n-devel
BuildRequires: kio-devel
BuildRequires: kmime-devel
BuildRequires: pkgconfig
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(Qt5Network) >= 5.7.0
BuildRequires: pkgconfig(Qt5Test) >= 5.7.0
%if %{with lang}
Recommends: %{name}-lang
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
KSMTP is a job based library to send email through an SMTP server.
%package -n libKPimSMTP5
Summary: Job-based library to send email through an SMTP server
Group: System/GUI/KDE
Recommends: %{name} = %{version}
Recommends: %{name}-lang = %{version}
%description -n libKPimSMTP5
KSMTP is a job based library to send email through an SMTP server. This
package contains the KSMTP library itself.
%package devel
Summary: Development files for KSMTP
Group: Development/Libraries/KDE
Requires: kcoreaddons-devel
Requires: ki18n-devel
Requires: kio-devel
Requires: kmime-devel
Requires: libKPimSMTP5 = %{version}
%description devel
This package contains all necessary include files and libraries needed
to build programs that use the KSMTP library.
%if %{with lang}
%lang_package
%endif
%prep
%setup -q
%autopatch -p1
%build
%cmake_kf5 -d build -- -DBUILD_TESTING=ON
%make_jobs
%install
%kf5_makeinstall -C build
%if %{with lang}
%find_lang %{name} --with-man --with-qt --all-name
%endif
%post -n libKPimSMTP5 -p /sbin/ldconfig
%postun -n libKPimSMTP5 -p /sbin/ldconfig
%files -n libKPimSMTP5
%defattr(-,root,root)
%doc COPYING.LIB
%{_kf5_libdir}/libKPimSMTP.so.*
%files
%defattr(-,root,root)
%doc COPYING.LIB
%config %{_kf5_configdir}/ksmtp.categories
%files devel
%defattr(-,root,root)
%doc COPYING.LIB
%{_includedir}/KPim/
%{_kf5_cmakedir}/KPimSMTP/
%{_kf5_libdir}/libKPimSMTP.so
%{_kf5_mkspecsdir}/qt_KSMTP.pri
%if %{with lang}
%files lang -f %{name}.lang
%doc COPYING.LIB
%endif
%changelog