Blob Blame History Raw
%global appname com.github.johnfactotum.Foliate

Name:           foliate
Version:        2.1.1
Release:        1%{?dist}
Summary:        Simple and modern GTK eBook reader

License:        GPLv3+
URL:            https://johnfactotum.github.io/foliate/
Source0:        https://github.com/johnfactotum/foliate/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  desktop-file-utils
BuildRequires:  intltool
BuildRequires:  libappstream-glib
BuildRequires:  meson >= 0.40
BuildRequires:  pkgconfig(gjs-1.0) >= 1.52
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(webkit2gtk-4.0)

Requires:       gjs
Requires:       hicolor-icon-theme

# For text-to-speech (TTS) support
Recommends:     espeak-ng

# Support for viewing .mobi, .azw, and .azw3 files
Recommends:     python3 >= 3.4

# Alternative text-to-speech (TTS) engines
Suggests:       espeak
Suggests:       festival

%description
A simple and modern GTK eBook viewer, built with GJS and Epub.js.

%prep
%autosetup -p1


%build
%meson
%meson_build


%install
%meson_install

# Ambiguous python shebang
find %{buildroot}%{_datadir}/%{appname}/assets/KindleUnpack/ -type f -name "*.py" -exec sed -e 's@/usr/bin/env python@/usr/bin/python3@g' -i "{}" \;
find %{buildroot}%{_datadir}/%{appname}/assets/KindleUnpack/ -type f -name "mobiml2xhtml.py" -exec sed -e 's@/usr/bin/python@/usr/bin/python3@g' -i "{}" \;

%find_lang %{appname}


%check
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop


%files -f %{appname}.lang
%license COPYING
%doc README.md
%{_bindir}/%{appname}
%{_datadir}/%{appname}/
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*.svg
%{_metainfodir}/*.appdata.xml


%changelog
* Thu Apr 09 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.1.1-1
- Update to 2.1.1

* Wed Apr 08 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.1.0-1
- Update to 2.1.0

* Sun Apr 05 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 2.0.0-1
- Update to 2.0.0

* Mon Mar 30 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 1.5.3-3
- Add dep: gjs | RHBZ#1818634

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Wed Sep 04 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.5.3-1
- Update to 1.5.3

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Fri Jul 19 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.5.2-1
- Update to 1.5.2

* Sun Jul 14 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.5.0-2
- Update to 1.5.0

* Sat Jul 13 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.4.0-3
- Patch: Use book language for Wikipedia

* Thu Jul 11 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.4.0-2
- Update to 1.4.0

* Sat Jun 29 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.3.1-1
- Update to 1.3.1

* Tue Jun 18 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.3.0-1
- Update to 1.3.0

* Thu Jun 06 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.2.0-1
- Update to 1.2.0

* Sun Jun 02 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.1.0-1
- Update to 1.1.0

* Sat Jun 01 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 1.0.1-1
- Initial package