File sink.spec of Package sink
#
# spec file for package sink
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: sink
Version: 0.9.0
Release: 0
Summary: An offline-caching, synchronization and indexing system for PIM data
License: GPL-2.0-only
Group: System/GUI/KDE
URL: https://projects.kde.org/projects/kde/pim/sink
#Source0: https://download.kde.org/unstable/sink/%%{version}/src/sink-%%{version}.tar.xz
Source0: https://invent.kde.org/pim/sink/-/archive/v%{version}/sink-v%{version}.tar.gz
Patch1: %{name}-missing-includes.patch
BuildRequires: cmake >= 2.8.12
BuildRequires: extra-cmake-modules
BuildRequires: kf5-filesystem
BuildRequires: lmdb-devel >= 0.9
BuildRequires: pkgconfig
BuildRequires: cmake(Flatbuffers) >= 1.4.0
BuildRequires: cmake(KAsync) >= 0.3
BuildRequires: cmake(KF5CalendarCore)
BuildRequires: cmake(KF5Codecs)
BuildRequires: cmake(KF5Contacts)
BuildRequires: cmake(KF5CoreAddons) >= 5.15
BuildRequires: cmake(KF5Mime)
BuildRequires: cmake(KIMAP2) >= 0.4.0
BuildRequires: cmake(KPimKDAV2) >= 0.4.0
BuildRequires: cmake(Qt5Concurrent)
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5Test)
BuildRequires: pkgconfig(gpgme)
BuildRequires: pkgconfig(libcurl) >= 7.20.0
BuildRequires: pkgconfig(libgit2) >= 0.20.0
BuildRequires: pkgconfig(libsasl2)
BuildRequires: pkgconfig(xapian-core) >= 1.4.0
%if 0%{?suse_version} <= 1500
BuildRequires: gcc9-c++
%else
BuildRequires: gcc-c++
%endif
%description
%{summary}.
Package spec for sink.
%package -n libsink0
Summary: C++ library for controlling asynchronous tasks
Group: System/Libraries
Provides: lib%{name}0 = %{version}
%description -n libsink0
%{summary}.
System libraries for sink
%package devel
Summary: Development headers for sink
Group: Development/Libraries/KDE
Requires: %{name} = %{version}-%{release}
Requires: lib%{name}0 = %{version}
%description devel
%{summary}.
Development headers for sink.
%prep
%setup -q -n %{name}-v%{version}
%patch1 -p1
%build
%if 0%{?suse_version} <= 1500
export CC=%{_bindir}/gcc-9
export CXX=%{_bindir}/g++-9
%endif
%cmake_kf5 -d build -- -DKDE_INSTALL_INCLUDEDIR=%{_kf5_includedir}
%make_jobs
%install
%kf5_makeinstall -C build
%post -n libsink0 -p /sbin/ldconfig
%postun -n libsink0 -p /sbin/ldconfig
%files
%doc
%{_kf5_bindir}/*
%{_kf5_libdir}/liblibhawd.so
%{_kf5_plugindir}/sink
%files -n libsink0
%{_kf5_libdir}/libsink.so.*
%files devel
%{_kf5_includedir}/sink/
%{_kf5_libdir}/cmake/Sink
%{_kf5_libdir}/libsink.so
%changelog