File pimcommon.spec of Package pimcommon

# spec file for package pimcommon
# 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:           pimcommon
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 KDE PIM PimCommon library
License:        GPL-2.0 and LGPL-2.1+
Group:          System/Libraries
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  extra-cmake-modules >= 5.19.0
BuildRequires:  grantlee5-devel
BuildRequires:  karchive-devel
BuildRequires:  kcalcore-devel
BuildRequires:  kcodecs-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcontacts-devel
BuildRequires:  kdbusaddons-devel
BuildRequires:  kdelibs4support-devel
BuildRequires:  kf5-filesystem
BuildRequires:  ki18n-devel
BuildRequires:  kimap-devel
BuildRequires:  kmime-devel
BuildRequires:  knewstuff-devel
BuildRequires:  kpimtextedit-devel >= %{_kapp_version}
BuildRequires:  ktextwidgets-devel
BuildRequires:  kwallet-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  libkdepim-devel
BuildRequires:  libxslt-devel
BuildRequires:  pkgconfig
BuildRequires:  sonnet-devel
BuildRequires:  cmake(KF5AkonadiMime)
BuildRequires:  cmake(Qt5Designer)
BuildRequires:  pkgconfig(Qt5Network) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Script) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Test) >= 5.4.0
BuildRequires:  pkgconfig(Qt5UiTools) >= 5.4.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.4.0
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# It can only build on the same platforms as Qt Webengine
ExclusiveArch:  %ix86 x86_64 %arm aarch64 mips mips64

This package contains the pimcommon library, used by several KDE PIM

%if %{with lang}

%setup -q



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

%package -n libKF5PimCommon5
Summary:        The PimCommon Library
License:        LGPL-2.1+
Group:          System/Libraries
Requires:       %{name} >= %{version}

%description -n libKF5PimCommon5
The PimCommon library

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

%package -n libKF5PimCommonAkonadi5
Summary:        The PimCommon Akonadi Library
License:        LGPL-2.1+
Group:          System/Libraries
Requires:       %{name} >= %{version}

%description -n libKF5PimCommonAkonadi5
The PimCommon Akonadi library

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

%package devel
Summary:        Development package for pimcommon
License:        LGPL-2.1+
Group:          Development/Libraries/KDE
Requires:       akonadi-contacts-devel
Requires:       akonadi-server-devel
Requires:       kconfig-devel
Requires:       kcontacts-devel
Requires:       kimap-devel
Requires:       libKF5PimCommon5 = %{version}
Requires:       libKF5PimCommonAkonadi5 = %{version}

%description devel
The development package for the pimcommon libraries

%config %{_kf5_configdir}/pimcommon.categories
%config %{_kf5_configdir}/pimcommon.renamecategories

%files devel

%files -n libKF5PimCommon5

%files -n libKF5PimCommonAkonadi5

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