e32963d
%global appid com.github.johnfactotum.Foliate
e32963d
%global libadwaita_version 1.4
e32963d
%global webkitgtk_version 2.40.1
e32963d
e32963d
# Git submodules
e32963d
#   * foliate-js
Packit 3b7dc15
%global commit1 35f749dd7cf8a2e9ee6d34b06d83c92ccd999ba9
e32963d
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
ed0c64a
ed0c64a
Name:           foliate
Packit e6cc33b
Version:        3.1.1
ab4cf81
Release:        %autorelease
ed0c64a
Summary:        Simple and modern GTK eBook reader
ed0c64a
4db8e15
License:        GPL-3.0-or-later
ed0c64a
URL:            https://johnfactotum.github.io/foliate/
ed0c64a
Source0:        https://github.com/johnfactotum/foliate/archive/%{version}/%{name}-%{version}.tar.gz
e32963d
Source1:        https://github.com/johnfactotum/foliate-js/archive/%{commit1}/%{name}-js-%{shortcommit1}.tar.gz
e32963d
ed0c64a
BuildArch:      noarch
ed0c64a
ed0c64a
BuildRequires:  desktop-file-utils
ed0c64a
BuildRequires:  intltool
ed0c64a
BuildRequires:  libappstream-glib
e32963d
BuildRequires:  meson >= 0.59
Packit 3b7dc15
BuildRequires:  pkgconfig(gjs-1.0) >= 1.76
e32963d
BuildRequires:  pkgconfig(gtk4) >= 4.12
feaef51
BuildRequires:  pkgconfig(iso-codes) >= 3.67
e32963d
BuildRequires:  pkgconfig(libadwaita-1) >= %{libadwaita_version}
e32963d
BuildRequires:  pkgconfig(webkitgtk-6.0) >= %{webkitgtk_version}
d92a596
e32963d
Requires:       gjs >= 1.76
ed0c64a
Requires:       hicolor-icon-theme
e32963d
Requires:       libadwaita >= %{libadwaita_version}
e32963d
Requires:       webkitgtk6.0 >= %{webkitgtk_version}
d92a596
248e4dc
# For text-to-speech (TTS) support
248e4dc
Recommends:     espeak-ng
d92a596
248e4dc
# Support for viewing .mobi, .azw, and .azw3 files
248e4dc
Recommends:     python3 >= 3.4
d92a596
248e4dc
# Alternative text-to-speech (TTS) engines
248e4dc
Suggests:       espeak
248e4dc
Suggests:       festival
ed0c64a
e32963d
Provides:       bundled(%{name}-js) = 0~git%{shortcommit1}
e32963d
ed0c64a
%description
ed0c64a
A simple and modern GTK eBook viewer, built with GJS and Epub.js.
ed0c64a
e32963d
ed0c64a
%prep
d92a596
%autosetup -p1
e32963d
%autosetup -p1 -a1
e32963d
mv %{name}-js-%{commit1}/* src/%{name}-js
d92a596
ed0c64a
ed0c64a
%build
ed0c64a
%meson
ed0c64a
%meson_build
ed0c64a
d92a596
ed0c64a
%install
ed0c64a
%meson_install
e32963d
%find_lang %{appid}
ed0c64a
d92a596
ed0c64a
%check
bcd23b8
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.xml
e32963d
# https://github.com/johnfactotum/foliate/issues/1111
e32963d
%dnl desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
860e9ad
ed0c64a
e32963d
%files -f %{appid}.lang
ed0c64a
%license COPYING
868cb50
%doc README.md
e32963d
%{_bindir}/%{name}
e32963d
%{_datadir}/%{appid}/
860e9ad
%{_datadir}/applications/*.desktop
860e9ad
%{_datadir}/glib-2.0/schemas/*.gschema.xml
ed0c64a
%{_datadir}/icons/hicolor/*/apps/*.svg
bcd23b8
%{_metainfodir}/*.xml
ed0c64a
d92a596
ed0c64a
%changelog
ab4cf81
%autochangelog