# # spec file for package sioyek # # Copyright (c) 2023 SUSE LLC # Copyright (c) 2023 Hyeonwoo Kang # # 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. %define ext_man .gz %define source_date_epoch_from_changelog 0 %global debug_package %{nil} Name: sioyek Version: 2.0.0 Release: 0 Summary: PDF Viewer for research papers and technical books License: GPL-3.0-or-later Group: Productivity/Office/Other URL: https://github.com/ahrm/sioyek Source0: https://github.com/ahrm/sioyek/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch1: link-mupdf-deps.patch BuildRequires: binutils BuildRequires: gcc-c++ BuildRequires: leptonica-devel BuildRequires: mupdf-devel BuildRequires: openjpeg2-devel BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gumbo) BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(jbig2dec) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(mujs) BuildRequires: pkgconfig(zlib) BuildRequires: qt5-qt3d BuildRequires: qt5-qt3d-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-static BuildRequires: tesseract-devel %description Sioyek is a PDF viewer designed for reading research papers and technical books. %prep %autosetup -p1 sed -i '/#define LINUX_STANDARD_PATHS/s/\/\///' pdf_viewer/main.cpp %build # We really cannot use the qt5 macros here because the builds fail # RPM build flags cannot really be used here also since they make the builds fail export QMAKE=/usr/bin/qmake-qt5 $QMAKE pdf_viewer_build_config.pro %make_build %install # The install paths in the config file does not correspond to # the usual paths of installation in openSUSE mkdir -p %{buildroot}%{_datadir}/%{name}/shaders/ cp -v pdf_viewer/shaders/* %{buildroot}%{_datadir}/%{name}/shaders/ install -Dm755 %{name} -t "%{buildroot}%{_bindir}/" install -Dm644 pdf_viewer/prefs.config -t "%{buildroot}%{_sysconfdir}/%{name}/" install -Dm644 pdf_viewer/keys.config -t "%{buildroot}%{_sysconfdir}/%{name}/" install -Dm644 resources/%{name}-icon-linux.png -t "%{buildroot}%{_datadir}/pixmaps/" install -Dm644 resources/%{name}.desktop -t "%{buildroot}%{_datadir}/applications/" install -Dm644 resources/%{name}.1 -t "%{buildroot}%{_mandir}/man1/" install -Dm644 tutorial.pdf -t "%{buildroot}%{_datadir}/%{name}/" %files %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_mandir}/man1/%{name}.1%{?ext_man} %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %{_datadir}/pixmaps/%{name}-icon-linux.png %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/prefs.config %config(noreplace) %{_sysconfdir}/%{name}/keys.config %license LICENSE %doc README.md %changelog