File goldendict-ng.spec of Package goldendict-ng
#
# spec file for package goldendict-ng
#
# 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 https://bugs.opensuse.org/
#
%define _name io.github.xiaoyifang.goldendict_ng
Name: goldendict-ng
Version: @SERVICE@
Release: 0
Summary: Dictionary Lookup Program
License: GPL-3.0-or-later
Group: Productivity/Office/Dictionary
URL: https://xiaoyifang.github.io/goldendict-ng
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
# /Section dependencies
BuildRequires: eb-devel
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(hunspell) >= 1.2.4
BuildRequires: pkgconfig(opencc)
BuildRequires: pkgconfig(tomlplusplus)
BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(vorbisfile)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xapian-core)
BuildRequires: pkgconfig(xtst)
# /Section Qt 6
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6Core5Compat)
BuildRequires: cmake(Qt6Multimedia)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6TextToSpeech)
BuildRequires: cmake(Qt6WebEngineWidgets)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6Xml)
BuildRequires: cmake(Qt6LinguistTools)
# /Section compresion libraries
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libzim)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(lzo2)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(zlib)
# /Section ffmpeg 6
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libswresample)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
Recommends: %{name}-lang
Provides: goldendict = %{version}
Obsoletes: goldendict < 1.5.1
Obsoletes: goldendict-lang < 1.5.1
%description
The Next Generation GoldenDict: A feature-rich dictionaries lookup program,
supporting many dictionary formats.
%lang_package
%prep
%autosetup -p1
rm -fv locale/crowdin.ts
%build
%cmake_qt6 \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DWITH_FFMPEG_PLAYER=ON \
-DWITH_EPWING_SUPPORT=ON \
-DWITH_XAPIAN=ON \
-DWITH_ZIM=ON \
-DUSE_SYSTEM_FMT=ON \
-DUSE_SYSTEM_TOML=ON
%qt6_build
%install
%qt6_install
%suse_update_desktop_file -r %{_name} Office Dictionary
%find_lang %{name} --with-qt --all-name
%files
%doc README.md
%{_bindir}/goldendict
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/metainfo/%{_name}.metainfo.xml
%{_datadir}/pixmaps/goldendict.png
%license LICENSE.txt
%files lang -f %{name}.lang
%dir %{_datadir}/goldendict
%dir %{_datadir}/goldendict/locale
%if 0%{?sle_version}
%{_datadir}/goldendict/locale/*_???.qm
%endif
%changelog