diff --git a/zathura-pdf-poppler.spec b/zathura-pdf-poppler.spec index d4a944b..7aa935e 100644 --- a/zathura-pdf-poppler.spec +++ b/zathura-pdf-poppler.spec @@ -1,14 +1,22 @@ -Name: zathura-pdf-poppler -Version: 0.2.5 -Release: 4%{?dist} -Summary: PDF support for zathura via poppler -Group: Applications/Publishing -License: zlib -URL: http://pwmt.org/projects/zathura/plugins/%{name} -Source0: http://pwmt.org/projects/zathura/plugins/download/%{name}-%{version}.tar.gz -Requires: zathura -BuildRequires: poppler-glib-devel -BuildRequires: zathura-devel >= 0.2.3 +Name: zathura-pdf-poppler +Version: 0.2.5 +Release: 5%{?dist} +Summary: PDF support for zathura via poppler +License: zlib +URL: http://pwmt.org/projects/zathura/plugins/%{name} +Source0: http://pwmt.org/projects/zathura/plugins/download/%{name}-%{version}.tar.gz +BuildRequires: binutils +BuildRequires: coreutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: sed +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(girara-gtk3) +BuildRequires: pkgconfig(poppler-glib) +BuildRequires: pkgconfig(zathura) +Requires: zathura +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives %description The zathura-pdf-poppler plugin adds PDF support to zathura by using @@ -25,13 +33,35 @@ mv pdf-debug.so pdf.so %install make DESTDIR=%{buildroot} LIBDIR=%{_libdir} install +mv %{buildroot}/%{_libdir}/zathura/pdf.so \ + %{buildroot}/%{_libdir}/zathura/pdf.so.poppler +touch %{buildroot}/%{_libdir}/zathura/pdf.so + +%pre +[ -L %{_libdir}/zathura/pdf.so ] || rm -f %{_libdir}/zathura/pdf.so + +%post +%{_sbindir}/update-alternatives --install \ + %{_libdir}/zathura/pdf.so %{name} %{_libdir}/zathura/pdf.so.poppler 10 + +%postun +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove \ + %{name} %{_libdir}/zathura/pdf.so.poppler +fi %files +%license LICENSE %doc AUTHORS LICENSE -%{_libdir}/zathura/pdf.so +%ghost %{_libdir}/zathura/pdf.so +%{_libdir}/zathura/pdf.so.poppler %{_datadir}/applications/%{name}.desktop %changelog +* Tue Jun 09 2015 Petr Ĺ abata - 0.2.5-5 +- Fix the dep list, install LICENSE with the %%license macro +- Add support for alternatives + * Mon Aug 18 2014 Fedora Release Engineering - 0.2.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild