File baloo5.spec of Package baloo5

#
# spec file for package baloo5
#
# Copyright (c) 2016 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
%define _tar_path 5.26
Name:           baloo5
Version:        5.26.0
Release:        0
%define kf5_version %{version}
Summary:        Framework for searching and managing metadata
License:        GPL-2.0+ and LGPL-2.1+ and LGPL-3.0
Group:          System/GUI/KDE
Url:            http://www.kde.org
Source:         http://download.kde.org/stable/frameworks/%{_tar_path}/baloo-%{version}.tar.xz
Source1:        baselibs.conf
# PATCH-FIX-OPENSUSE fix-cmakelists-comments.diff -- Change cmake 3.0 block comments to work in cmake 2.x
Patch1:         fix-cmakelists-comments.diff
# PATCHES 2-12 ARE CONTAINED IN 5.27.0
Patch2:         0001-fix-baloo_file-crash-with-corrupted-database.patch
Patch3:         0003-allow-ctime-mtime-0.patch
Patch4:         0004-Increase-size-limit-of-baloo-index-for-64-bit-machin.patch
Patch5:         0005-Make-e.g.-Baloo-Query-thread-safe.patch
Patch6:         0006-fix-typo.patch
Patch7:         0007-fix-missing-m_env-nullptr-assignment.patch
Patch8:         0008-Transaction-not-created-don-t-try-to-abort-them.patch
Patch9:         0009-add-missing-close-env-as-pointed-out-by-Lo-c-Yhuel.patch
Patch10:        0010-Fix-sorted-insert-aka-flat_map-like-insert.patch
Patch11:        0011-Open-baloo-lmdb-database-read-only-beside-in-baloo_f.patch
Patch12:        0012-Use-correct-config-entry-in-autostart-condition.patch
BuildRequires:  extra-cmake-modules >= %{_tar_path}
BuildRequires:  kf5-filesystem
BuildRequires:  libattr-devel
BuildRequires:  lmdb-devel
BuildRequires:  cmake(KF5Config) >= %{_tar_path}
BuildRequires:  cmake(KF5CoreAddons) >= %{_tar_path}
BuildRequires:  cmake(KF5Crash) >= %{_tar_path}
BuildRequires:  cmake(KF5DBusAddons) >= %{_tar_path}
BuildRequires:  cmake(KF5FileMetaData) >= %{_tar_path}
BuildRequires:  cmake(KF5I18n) >= %{_tar_path}
BuildRequires:  cmake(KF5IdleTime) >= %{_tar_path}
BuildRequires:  cmake(KF5KIO) >= %{_tar_path}
BuildRequires:  cmake(KF5Solid) >= %{_tar_path}
BuildRequires:  cmake(Qt5Core) >= 5.5.0
BuildRequires:  cmake(Qt5DBus) >= 5.5.0
BuildRequires:  cmake(Qt5Qml) >= 5.5.0
BuildRequires:  cmake(Qt5Quick) >= 5.5.0
BuildRequires:  cmake(Qt5Test) >= 5.5.0
BuildRequires:  cmake(Qt5Widgets) >= 5.5.0
BuildRequires:  cmake(Qt5Widgets) >= 5.5.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Baloo is a framework for searching and managing metada

%package -n libKF5Baloo5
Summary:        Core library for Baloo Framework
Group:          System/GUI/KDE

%description -n libKF5Baloo5
Baloo is a framework for searching and managing metadata This
package contains Baloo's core library.

%package -n libKF5BalooEngine5
Summary:        Baloo Engine library
Group:          System/GUI/KDE

%description -n libKF5BalooEngine5
Baloo is a framework for searching and managing metadata This
package contains Baloo's Engine library.

%package file
Summary:        Filesearch components for Baloo Framework
Group:          System/GUI/KDE
Requires:       libQt5Sql5-sqlite
%if %{with lang}
Recommends:     %{name}-lang
%endif
%if 0%{?suse_version} > 1314 && "%{suse_version}" != "1320"
Provides:       baloo-file = %{version}
Obsoletes:      baloo-file < %{version}
%else
Conflicts:      baloo-file
%endif

%description file
Baloo is a framework for searching and managing metadata. This
package contains filesearch components.

%package kioslaves
Summary:        KIO slave components for Baloo Framework
Group:          System/GUI/KDE
Requires:       kded

%description kioslaves
Baloo is a framework for searching and managing metadata. This
package contains KIO slave components.

%package tools
Summary:        Aditional components for Baloo Framework
Group:          System/GUI/KDE
%if 0%{?suse_version} > 1314 && "%{suse_version}" != "1320"
Provides:       baloo-tools = %{version}
Obsoletes:      baloo-tools < %{version}
%else
Conflicts:      baloo-tools
%endif

%description tools
Baloo is a framework for searching and managing metadata. This
package contains aditional command line utilities.

%package imports
Summary:        QML components for Baloo Framework
Group:          System/GUI/KDE

%description imports
Baloo is a framework for searching and managing metadata. This
package contains QML imports.

%package devel
Summary:        Development package for baloo5
Group:          Development/Libraries/KDE
Requires:       libKF5Baloo5 = %{version}
Requires:       libKF5BalooEngine5 = %{version}
Requires:       lmdb-devel
Requires:       cmake(KF5CoreAddons) >= %{_tar_path}
Requires:       cmake(KF5FileMetaData) >= %{_tar_path}
Requires:       cmake(Qt5Core) >= 5.5.0
# DBus interface file
#if 0%%{?suse_version} > 1320
# We can't obsolete devel file as long as we don't have KF5-based KDEPIM
#Obsoletes:      baloo-devel
#else
Conflicts:      baloo-devel
#endif

%description devel
Baloo is a framework for searching and managing metadata. This
package contains aditional command line utilities. Development files.

%lang_package
%prep
%setup -q -n baloo-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1

%build
  %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
  %make_jobs

%install
  %kf5_makeinstall -C build
%if %{with lang}
  %kf5_find_lang
%endif

%post -n libKF5Baloo5 -p /sbin/ldconfig

%postun -n libKF5Baloo5 -p /sbin/ldconfig

%post file -p /sbin/ldconfig

%postun file -p /sbin/ldconfig

%post -n libKF5BalooEngine5 -p /sbin/ldconfig

%postun -n libKF5BalooEngine5 -p /sbin/ldconfig

%files -n libKF5Baloo5
%defattr(-,root,root)
%doc COPYING*
%{_kf5_libdir}/libKF5Baloo.so.*

%files -n libKF5BalooEngine5
%defattr(-,root,root)
%doc COPYING*
%{_kf5_libdir}/libKF5BalooEngine.so.*

%files file
%defattr(-,root,root)
%doc COPYING*
%{_kf5_bindir}/baloo_file
%{_kf5_bindir}/baloo_file_extractor
%{_kf5_bindir}/balooctl
%{_kf5_configdir}/autostart/baloo_file.desktop
%{_kf5_iconsdir}/hicolor/*/apps/baloo.png

%files kioslaves
%defattr(-,root,root)
%doc COPYING*
%dir %{_kf5_plugindir}/kf5/kio
%dir %{_kf5_plugindir}/kf5
%{_kf5_plugindir}/kf5/kio/baloosearch.so
%{_kf5_servicesdir}/baloosearch.protocol
%dir %{_kf5_plugindir}/kf5/kded
%{_kf5_plugindir}/kf5/kded/baloosearchmodule.so
%{_kf5_plugindir}/kf5/kio/tags.so
%{_kf5_servicesdir}/tags.protocol
%{_kf5_plugindir}/kf5/kio/timeline.so
%{_kf5_servicesdir}/timeline.protocol

%files tools
%defattr(-,root,root)
%doc COPYING*
%{_kf5_bindir}/baloosearch
%{_kf5_bindir}/balooshow

%files imports
%defattr(-,root,root)
%doc COPYING*
%{_kf5_qmldir}/

%files devel
%defattr(-,root,root)
%doc COPYING*
%dir %{_kf5_includedir}
%{_kf5_includedir}/
%{_kf5_libdir}/cmake/KF5Baloo/
%{_kf5_libdir}/libKF5Baloo.so
%{_kf5_libdir}/pkgconfig/Baloo.pc
%{_kf5_sharedir}/dbus-1/interfaces/*.xml

%files
%defattr(-,root,root)
%doc COPYING*

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

%changelog