diff --git a/xreader.spec b/xreader.spec index 8a017d3..4acad83 100644 --- a/xreader.spec +++ b/xreader.spec @@ -1,10 +1,17 @@ # Filter provides from plugins. %global __provides_exclude_from ^%{_libdir}/%{name}/.*$ +# Caja in Fedora <= 25 is to old for the extension. +%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 +%global caja_ext 1 +%else # 0%%{?fedora} >= 26 || 0%%{?rhel} >= 8 +%global caja_ext 0 +%endif # 0%%{?fedora} >= 26 || 0%%{?rhel} >= 8 + Name: xreader Version: 1.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple document viewer License: GPLv2+ @@ -26,7 +33,9 @@ BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk+-unix-print-3.0) BuildRequires: pkgconfig(kpathsea) +%if 0%{?caja_ext} BuildRequires: pkgconfig(libcaja-extension) +%endif # 0%%{?caja_ext} BuildRequires: pkgconfig(libgxps) BuildRequires: pkgconfig(libnemo-extension) BuildRequires: pkgconfig(libsecret-1) @@ -89,6 +98,7 @@ It adds an additional tab called "Document" to the file properties dialog. +%if 0%{?caja_ext} %package -n caja-extension-%{name} Summary: X-Apps Document Reader file manager extension @@ -103,6 +113,7 @@ This package contains the xreader extension for the Caja file manager. It adds an additional tab called "Document" to the file properties dialog. +%endif # 0%%{?caja_ext} %prep @@ -115,6 +126,9 @@ export LDFLAGS="-Wl,--as-needed %{__global_ldflags}" %configure \ --disable-silent-rules \ --disable-static \ +%if 0%{?caja_ext} == 0 + --disable-caja \ +%endif # 0%%{?caja_ext} == 0 --enable-gtk-doc \ --enable-introspection \ --enable-pixbuf @@ -203,15 +217,20 @@ fi %{_libdir}/nemo/extensions-3.0/libxreader-properties-page.so +%if 0%{?caja_ext} %files -n caja-extension-%{name} # This directory is not owned by any other package, # maybe should be added to the caja package %dir %{_datadir}/caja/extensions/ %{_datadir}/caja/extensions/libxreader-properties-page.caja-extension %{_libdir}/caja/extensions-2.0/libxreader-properties-page.so +%endif # 0%%{?caja_ext} %changelog +* Mon May 08 2017 Björn Esser - 1.4.0-2 +- Disable Caja-extension for Fedora <= 25 + * Mon May 08 2017 Björn Esser - 1.4.0-1 - Initial import (rhbz#1424832)