File libkleo.spec of Package libkleo

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


%bcond_without lang

Name:           libkleo
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:        Base package of Kleopatra, a KDE key manager
License:        GPL-2.0 and GPL-2.0+ and LGPL-2.1+
Group:          Development/Libraries/KDE
Url:            http://www.kde.org
Source0:        %{name}-%{version}.tar.xz
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
%else
BuildRequires:  boost-devel
%endif
BuildRequires:  extra-cmake-modules >= 5.19.0
BuildRequires:  kcodecs-devel
BuildRequires:  kcompletion-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kf5-filesystem
BuildRequires:  ki18n-devel
BuildRequires:  kitemmodels-devel
BuildRequires:  kpimtextedit-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  kwindowsystem-devel
BuildRequires:  libgpgmepp-devel
BuildRequires:  libqgpgme-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.4.0
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libkleo is a library used by KDE PIM applications to handle cryptographic key and certificate management.

%if %{with lang}
%lang_package
%endif

%prep
%setup -q

%build
%cmake_kf5 -d build

%make_jobs

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

%package -n libKF5Libkleo5
Summary:        LibKleo library for kdepim
License:        LGPL-2.1+
Group:          System/Libraries
Requires:       libkleo = %{version}

%description -n libKF5Libkleo5
This package contains the libkleo library, a library used by KDE PIM applications to handle cryptographic key and certificate management.

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

%package devel
Summary:        Development package for libkleo
License:        LGPL-2.1+
Group:          Development/Libraries/KDE
Requires:       libKF5Libkleo5 = %{version}
Requires:       libgpgmepp-devel
Requires:       libqgpgme-devel

%description devel
The development package for the libkleo libraries

%files devel
%defattr(-,root,root)
%{_includedir}/KF5/Libkleo/
%{_includedir}/KF5/libkleo/
%{_includedir}/KF5/libkleo_version.h
%{_libdir}/cmake/KF5Libkleo/
%{_libdir}/libKF5Libkleo.so
%{_libdir}/qt5/mkspecs/modules/qt_Libkleo.pri

%files
%defattr(-,root,root)
%config %{_kf5_configdir}/libkleopatrarc
%{_datadir}/libkleopatra/
%config %{_kf5_configdir}/libkleo.categories
%config %{_kf5_configdir}/libkleo.renamecategories

%files -n libKF5Libkleo5
%defattr(-,root,root)
%{_libdir}/libKF5Libkleo.so.*

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

%changelog