File krename.spec of Package krename

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

Name:           krename
Summary:        A Powerful Batch Renamer for KDE
Version:        5.0.60.git20230523
Release:        0
Source0:        %{name}-%{version}.tar.xz
License:        GPL-2.0+
Group:          Productivity/File utilities
BuildRequires:  extra-cmake-modules
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  cmake(KF5Archive) >= 5.85.0
BuildRequires:  cmake(KF5Completion)
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5Crash)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5IconThemes)
BuildRequires:  cmake(KF5ItemViews)
BuildRequires:  cmake(KF5JobWidgets)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5Service)
BuildRequires:  cmake(Qt5Test)
BuildRequires:  cmake(KF5WidgetsAddons)
BuildRequires:  cmake(KF5XmlGui)
BuildRequires:  pkgconfig(Qt5Core) >= 5.12.0
BuildRequires:  pkgconfig(Qt5Qml)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(exiv2)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(libopenssl)
%if 0%{?sle_version} == 150400 && 0%{?is_opensuse}
BuildRequires:  pkgconfig(libpodofo-0)
BuildRequires:  pkgconfig(libpodofo)
BuildRequires:  pkgconfig(taglib)
Recommends:     %{name}-lang = %{version}

KRename is a powerful batch renamer for 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.



# Remove build time references so build-compare can do its work (fix rpmlint warning "file-contains-date-and-time")
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/main.cpp
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/main.cpp

export RPM_OPT_FLAGS="%optflags -I%{_includedir}/freetype2"
%cmake_kf5 -d build 

%kf5_makeinstall -C build
%suse_update_desktop_file -r org.kde.%{name} Qt KDE System FileManager

%find_lang %{name}
%find_lang org.kde.%{name}.appdata %{name}.lang

%fdupes %buildroot

%license LICENSES/BSD-3-Clause.txt LICENSES/GPL-2.0-or-later.txt
%dir %{_kf5_iconsdir}/hicolor
%dir %{_kf5_iconsdir}/hicolor/16x16
%dir %{_kf5_iconsdir}/hicolor/16x16/apps
%dir %{_kf5_iconsdir}/hicolor/32x32
%dir %{_kf5_iconsdir}/hicolor/32x32/apps
%dir %{_kf5_sharedir}/kio
%dir %{_kf5_sharedir}/kio/servicemenus

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by