From 3aa7912252753c9c7ee21f760a1f6ea0ef65f864 Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Wed, 3 Apr 2019 13:04:00 +0200 Subject: [PATCH] Adjust the build for Flatpak An Evince Flatpak from this RPM cannot: * bundle texlive * install systemd unit service * install/require nautilus extension --- evince.spec | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/evince.spec b/evince.spec index 7d634e3..7dd7b8f 100644 --- a/evince.spec +++ b/evince.spec @@ -6,7 +6,7 @@ Name: evince Version: 3.32.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse @@ -37,11 +37,13 @@ BuildRequires: yelp-tools BuildRequires: /usr/bin/desktop-file-validate BuildRequires: libappstream-glib-devel BuildRequires: gnome-common +%if ! 0%{?flatpak} BuildRequires: pkgconfig(synctex) >= %{synctex_version} # for the nautilus properties page BuildRequires: pkgconfig(libnautilus-extension) # for the dvi backend BuildRequires: texlive-lib-devel +%endif %if 0%{?fedora} # for the djvu backend BuildRequires: djvulibre-devel @@ -104,6 +106,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} This package contains a backend to let evince display djvu files. %endif +%if ! 0%{?flatpak} %package nautilus Summary: Evince extension for nautilus Requires: %{name}%{?_isa} = %{version}-%{release} @@ -112,7 +115,7 @@ Requires: nautilus%{?_isa} %description nautilus This package contains the evince extension for the nautilus file manager. It adds an additional tab called "Document" to the file properties dialog. - +%endif %prep %autosetup -p1 @@ -132,7 +135,10 @@ autoreconf -f -i %endif --enable-xps=yes \ --enable-t1lib=no \ +%if 0%{?flatpak} --without-systemduserunitdir \ + --disable-nautilus \ +%endif --enable-ps=yes make %{?_smp_mflags} V=1 LIBTOOL=/usr/bin/libtool @@ -154,8 +160,10 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications # Get rid of static libs and .la files. rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.a +%if ! 0%{?flatpak} rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-3.0/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-3.0/*.a +%endif rm -f $RPM_BUILD_ROOT%{_libdir}/evince/4/backends/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/evince/4/backends/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -181,6 +189,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p %{_datadir}/GConf/gsettings/evince.convert %{_datadir}/metainfo/org.gnome.Evince.appdata.xml %{_datadir}/thumbnailers/evince.thumbnailer +%if ! 0%{?flatpak} +%{_userunitdir}/org.gnome.Evince.service +%endif %files libs %doc NEWS AUTHORS @@ -228,10 +239,12 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p %{_datadir}/gir-1.0/EvinceDocument-3.0.gir %{_datadir}/gir-1.0/EvinceView-3.0.gir +%if ! 0%{?flatpak} %files dvi %{_libdir}/evince/4/backends/libdvidocument.so* %{_libdir}/evince/4/backends/dvidocument.evince-backend %{_datadir}/metainfo/evince-dvidocument.metainfo.xml +%endif %if 0%{?fedora} %files djvu @@ -240,10 +253,15 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p %{_datadir}/metainfo/evince-djvudocument.metainfo.xml %endif +%if ! 0%{?flatpak} %files nautilus %{_libdir}/nautilus/extensions-3.0/libevince-properties-page.so +%endif %changelog +* Thu Apr 04 2019 Felipe Borges - 3.32.0-2 +* Make the Evince RPM buildable as a Flatpak + * Thu Mar 14 2019 Kalev Lember - 3.32.0-1 - Update to 3.32.0