File akonadi-server.spec of Package akonadi-server

#
# spec file for package akonadi-server
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#


Name:           akonadi-server
Version:        15.08.0
Release:        0
%define rname   akonadi
Summary:        PIM Storage Service
License:        LGPL-2.1+
Group:          System/GUI/KDE
Url:            http://akonadi-project.org
Source:         %{rname}-%{version}.tar.xz
Source99:       akonadi-server-rpmlintrc
# PATCH-FIX-UPSTREAM akonadi-fix-licenses.diff -- Ensure all files are LGPL-2.1+ -- kde#351747 boo#942998
Patch0:         akonadi-fix-licenses.diff
BuildRequires:  boost-devel
BuildRequires:  cmake >= 2.8.9
BuildRequires:  kf5-filesystem
BuildRequires:  libxml2
BuildRequires:  libxslt
BuildRequires:  mariadb
BuildRequires:  shared-mime-info
BuildRequires:  sqlite3-devel
BuildRequires:  postgresql-devel
BuildRequires:  extra-cmake-modules
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post):    shared-mime-info
Requires(postun):  shared-mime-info
Requires:       libKF5AkonadiPrivate5 = %{version}
Requires:       libqt5-sql-mysql
Requires:       mysql
Suggests:       mariadb
Conflicts:      akonadi-runtime

%description
This package contains the data files of Akonadi, the KDE PIM storage
service.

%package -n libKF5AkonadiPrivate-devel
Summary:        PIM Storage Service: Build Environment
Group:          Development/Libraries/X11
Requires:       libKF5AkonadiPrivate5 = %{version}
Requires:       %{name} = %{version}
Conflicts:      libakonadiprotocolinternals-devel

%description -n libKF5AkonadiPrivate-devel
This package contains development files of Akonadi, the KDE PIM storage
service.

%package -n libKF5AkonadiPrivate5
Summary:        PIM Storage Service
Group:          System/GUI/KDE

%description -n libKF5AkonadiPrivate5
This package contains the data files of Akonadi, the KDE PIM storage
service.

%prep
%setup -q -n %{rname}-%{version}
%patch0 -p1

%build
  %cmake_kf5 -d build -- -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DQT_PLUGINS_DIR=%{_kf5_plugindir}
  %make_jobs

%install
  %kf5_makeinstall -C build

%post
/sbin/ldconfig
%{_kf5_bindir}/update-mime-database %{_kf5_sharedir}/mime &> /dev/null || :

%postun
/sbin/ldconfig
%{_kf5_bindir}/update-mime-database %{_kf5_sharedir}/mime &> /dev/null || :

%post -n libKF5AkonadiPrivate5 -p /sbin/ldconfig

%postun -n libKF5AkonadiPrivate5 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc lgpl-license AUTHORS README*
%dir %{_kf5_sysconfdir}/xdg/akonadi
%config %{_kf5_sysconfdir}/xdg/akonadi/mysql-global-mobile.conf
%config %{_kf5_sysconfdir}/xdg/akonadi/mysql-global.conf
%{_kf5_bindir}/akonadi*
%{_kf5_bindir}/asapcat
%{_kf5_plugindir}/sqldrivers/libqsqlite3.so
%{_kf5_sharedir}/dbus-1/services/org.freedesktop.Akonadi.Control.service
%{_kf5_sharedir}/mime/packages/akonadi-mime.xml
%{_kf5_sysconfdir}/xdg/akonadi.categories

%files -n libKF5AkonadiPrivate-devel
%defattr(-,root,root)
%doc lgpl-license
%dir %{_kf5_libdir}/cmake
%{_kf5_includedir}/akonadi/
%{_kf5_libdir}/cmake/KF5AkonadiServer/
%{_kf5_libdir}/libKF5AkonadiPrivate.so
%{_kf5_sharedir}/dbus-1/interfaces/org.freedesktop.Akonadi.*.xml

%files -n libKF5AkonadiPrivate5
%defattr(-,root,root)
%doc lgpl-license
%{_kf5_libdir}/libKF5AkonadiPrivate.so.*

%changelog
openSUSE Build Service is sponsored by