File crqt-ng.spec of Package crqt-ng

#
# spec file for package crqt-ng
#
# Copyright (c) 2024 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 https://bugs.opensuse.org/
#


Name:           crqt-ng
Version:        @SERVICE@
Release:        0
Summary:        Cross platform open source e-book reader
License:        GPL-2.0-or-later
Group:          Productivity/Office/Other
URL:            https://gitlab.com/coolreader-ng/crqt-ng
Source0:        %{name}-%{version}.tar.xz
Patch0:         window_size.patch
BuildRequires:  cmake
BuildRequires:  cmake(Qt6LinguistTools)
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(crengine-ng)
BuildRequires:  update-desktop-files
Recommends:     %{name}-lang

%description
crqt-ng - cross-platform open source e-book reader using crengine-ng. It is
a fork of the CoolReader project.

%lang_package

%prep
%autosetup -p1
sed -i '/cmake_minimum_required/s/3\.0\.0 /3.16 /' CMakeLists.txt
sed -i '/^Exec=/s/F/U/' src/desktop/crqt.desktop
sed -i 's/^\(Name=\).*/\1CoolReaderNG\/Qt/' src/desktop/crqt.desktop

%build
%cmake_qt6 \
    -DUSE_QT=QT6
%qt6_build

%install
%qt6_install

%find_lang crqt --with-qt

%files
%doc AUTHORS CONTRIBUTING.md README.md
%{_bindir}/crqt
%dir %{_datadir}/crqt
%{_datadir}/crqt/backgrounds
#%%{_datadir}/crqt/skins
%{_datadir}/crqt/textures
%{_datadir}/applications/crqt.desktop
%{_datadir}/metainfo/crqt.appdata.xml
%{_datadir}/pixmaps/crqt.{png,xpm}
%{_datadir}/icons/hicolor/*/apps/crqt.??g
%license LICENSE

%files lang -f crqt.lang
%dir %{_datadir}/crqt
%dir %{_datadir}/crqt/i18n

%changelog
openSUSE Build Service is sponsored by