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 http://bugs.opensuse.org/
#
%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
Url: http://www.kde.org
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
%description
This package contains the pimcommon library, used by several KDE PIM
applications.
%if %{with lang}
%lang_package
%endif
%prep
%setup -q
%build
%cmake_kf5 -d build -- -DQTWEBENGINE_SUPPORT_OPTION=TRUE
%make_jobs
%install
%kf5_makeinstall -C build
%if %{with lang}
%find_lang %{name} --with-man --all-name
%endif
%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
%files
%defattr(-,root,root)
%config %{_kf5_configdir}/pimcommon.categories
%config %{_kf5_configdir}/pimcommon.renamecategories
%files devel
%defattr(-,root,root)
%{_includedir}/KF5/PimCommon/
%{_includedir}/KF5/PimCommonAkonadi
%{_includedir}/KF5/pimcommon/
%{_includedir}/KF5/pimcommonakonadi/
%{_includedir}/KF5/pimcommon_version.h
%{_kf5_plugindir}/designer/
%{_libdir}/cmake/KF5PimCommon/
%{_libdir}/libKF5PimCommon.so
%{_libdir}/libKF5PimCommonAkonadi.so
%{_libdir}/qt5/mkspecs/modules/qt_PimCommon.pri
%{_libdir}/qt5/mkspecs/modules/qt_PimCommonAkonadi.pri
%{_includedir}/KF5/pimcommonakonadi_version.h
%{_libdir}/cmake/KF5PimCommonAkonadi/
%files -n libKF5PimCommon5
%defattr(-,root,root)
%{_libdir}/libKF5PimCommon.so.*
%files -n libKF5PimCommonAkonadi5
%defattr(-,root,root)
%{_libdir}/libKF5PimCommonAkonadi.so.*
%if %{with lang}
%files lang -f %{name}.lang
%doc COPYING*
%endif
%changelog