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 qt_version 6
Name: goldendict-ng
Version: 25.05.0
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: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: pkgconfig
BuildRequires: unzip
BuildRequires: update-desktop-files
# /Section dependencies
BuildRequires: eb-devel
BuildRequires: libxapian-devel
BuildRequires: qt6-linguist-devel
BuildRequires: hunspell-devel >= 1.2.4
BuildRequires: pkgconfig(opencc)
BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xapian-core)
BuildRequires: pkgconfig(xtst)
# /Section Qt
BuildRequires: pkgconfig(Qt%{qt_version}Concurrent)
BuildRequires: pkgconfig(Qt%{qt_version}Core)
BuildRequires: pkgconfig(Qt%{qt_version}Gui)
BuildRequires: pkgconfig(Qt%{qt_version}Multimedia)
BuildRequires: pkgconfig(Qt%{qt_version}Svg)
BuildRequires: pkgconfig(Qt%{qt_version}TextToSpeech)
BuildRequires: pkgconfig(Qt%{qt_version}WebEngineWidgets)
BuildRequires: pkgconfig(Qt%{qt_version}Widgets)
BuildRequires: pkgconfig(Qt%{qt_version}Xml)
BuildRequires: qt6-tools-linguist
BuildRequires: pkgconfig(Qt6Core5Compat)
# /Section compresion libraries
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(libzip)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(lzo2)
BuildRequires: pkgconfig(zlib)
# /Section ffmpeg 6
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
Requires: qt6-multimedia
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
%build
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON -DWITH_EPWING_SUPPORT=OFF -DWITH_ZIM=OFF
%cmake_build
%install
%cmake_install
%files
%license LICENSE.txt
%{_bindir}/goldendict
%{_datadir}/goldendict
%{_datadir}/applications/io.github.xiaoyifang.goldendict_ng.desktop
%{_datadir}/metainfo/io.github.xiaoyifang.goldendict_ng.metainfo.xml
%{_datadir}/pixmaps/goldendict.png
%exclude %{_datadir}/goldendict/locale/
%files lang
%{_datadir}/goldendict/locale/
%exclude %{_datadir}/goldendict/locale/crowdin.qm
%changelog