File krename.spec of Package krename

# spec file for package krename
# Copyright (c) 2018 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

Name:           krename
Version:        5.0.0
Release:        0
Summary:        A Powerful Batch Renamer by KDE
License:        GPL-2.0+
Group:          Productivity/File utilities
# PATCH-FIX-UPSTREAM servicemenus-files.patch -- Make the desktop files KDE and XDG compatible
Patch0:         servicemenus-files.patch
# PATCH-FIX-UPSTREAM remove-gplv2-code.diff -- Remove GPLv2 only code (only used for self-testing)
Patch1:         remove-gplv2-code.diff
BuildRequires:  extra-cmake-modules
BuildRequires:  freetype2-devel
BuildRequires:  kcompletion-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kcrash-devel
BuildRequires:  ki18n-devel
BuildRequires:  kiconthemes-devel
BuildRequires:  kio-devel
BuildRequires:  kitemviews-devel
BuildRequires:  kjobwidgets-devel
BuildRequires:  kjs-devel
BuildRequires:  kservice-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  libexiv2-devel
BuildRequires:  libpodofo-devel
%if 0%{?suse_version} >= 1500
# podofo 0.9.5 needs openssl-devel by mistake, should be fixed in 0.9.6
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(taglib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

KRename is a powerful batch renamer by KDE. It allows you to easily rename
hundreds or even more files in one go. The filenames can be created by parts of
the original filename, numbering the files or accessing hundreds of informations
about the file, like creation date or Exif informations of an image.

%setup -q
%patch0 -p0
# GPLv2 only code, not really needed, lets avoid the license discussion
rm -rf src/modeltest.*
%patch1 -p0

%cmake_kf5 -d build 

%kf5_makeinstall -C build
%suse_update_desktop_file -r -G "Batch File Renamer" org.kde.krename Qt KDE System FileManager

%find_lang %{name}

%files -f %{name}.lang
%if 0%{?suse_version} == 1315 && 0%{?sle_version} == 120100
%dir %{_kf5_appstreamdir}

openSUSE Build Service is sponsored by