File baloo_kcm.spec of Package baloo_kcm

#
# spec file for package baloo_kcm
#
# 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/
#
%define rname baloo-kcmadv
%define rversion 0.1

Name:           baloo_kcm
Version:        %{rversion}+20141112
Release:        0
Summary:        Advanced KCM for Baloo framework
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/GUI/KDE
Url:            https://gitorious.org/baloo-kcmadv
%if ( 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420300 )
Source0:        %{rname}-%{rversion}git.tar.xz
%else
Source0:        %{rname}-%{rversion}.tar.xz
%endif
Patch:          fix-build.patch
%if ( 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420300 )
BuildRequires:  pkgconfig(Baloo)
BuildRequires:  extra-cmake-modules
BuildRequires:  kconfig-devel
BuildRequires:  kconfigwidgets-devel
BuildRequires:  kdelibs4support-devel
BuildRequires:  kdoctools-devel
BuildRequires:  kf5-filesystem
BuildRequires:  ki18n-devel
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
%else
BuildRequires:  baloo-devel
BuildRequires:  libkde4-devel
%kde4_runtime_requires
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Provides an advanced configuration module for Baloo.

%prep
%if ( 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420300 )
%setup -q -n %{rname}-%{rversion}git
%patch -p1
%else
%setup -q -n %{rname}-%{rversion}
%endif

%build
%if ( 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420300 )
  %cmake_kf5 -d build
%else
  %cmake_kde4 -d build
%endif
  %make_jobs

%install
%if ( 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420300 )
  %kf5_makeinstall -C build
%else
  %kde4_makeinstall -C build
  %kde_post_install
%endif

%files
%defattr(-,root,root)
%if ( 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420300 )
  %{_kf5_plugindir}/
  %{_kf5_servicesdir}/
  %dir %{_kf5_htmldir}/en
  %dir %{_kf5_htmldir}
  %doc %{_kf5_htmldir}/en/*/
%else
  %doc %{_kde4_datadir}/doc/kde/
  %{_kde4_modulesdir}/kcm_baloofileadv.so
  %{_kde4_servicesdir}/kcm_baloofileadv.desktop
%endif

%changelog