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 http://bugs.opensuse.org/
#


Name:           krename
Version:        5.0.0
Release:        0
Summary:        A Powerful Batch Renamer by KDE
License:        GPL-2.0+
Group:          Productivity/File utilities
Url:            http://www.krename.net/
Source0:        https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM servicemenus-files.patch asterios.dramis@gmail.com -- Make the desktop files KDE and XDG compatible
Patch0:         servicemenus-files.patch
# PATCH-FIX-UPSTREAM remove-gplv2-code.diff dmueller@suse.de -- 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
%endif
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(taglib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
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.

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

%build
%cmake_kf5 -d build 
%make_jobs

%install
%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
%defattr(-,root,root,-)
%doc AUTHORS COPYING README.md TODO
%if 0%{?suse_version} == 1315 && 0%{?sle_version} == 120100
%dir %{_kf5_appstreamdir}
%endif
%{_kf5_applicationsdir}/org.kde.krename.desktop
%{_kf5_appstreamdir}/org.kde.krename.appdata.xml
%{_kf5_bindir}/krename
%{_kf5_iconsdir}/hicolor/*/apps/krename.png
%{_kf5_iconsdir}/locolor/*/apps/krename.png
%{_kf5_servicesdir}/ServiceMenus/

%changelog
openSUSE Build Service is sponsored by