Blob Blame History Raw
Name:             zathura-pdf-poppler
Version:          0.2.7
Release:          1%{?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
Patch0:           zathura-pdf-poppler-0.2.7-Fix-make-debug.patch
BuildRequires:    binutils
BuildRequires:    coreutils
BuildRequires:    desktop-file-utils
BuildRequires:    gcc
BuildRequires:    libappstream-glib
BuildRequires:    make
BuildRequires:    pkgconfig
BuildRequires:    sed
BuildRequires:    pkgconfig(cairo)
BuildRequires:    pkgconfig(girara-gtk3)
BuildRequires:    pkgconfig(poppler-glib)
BuildRequires:    pkgconfig(zathura)
Requires:         zathura
Requires(post):   %{_sbindir}/update-alternatives
Requires(post):   desktop-file-utils
Requires(postun): %{_sbindir}/update-alternatives
Requires(postun): desktop-file-utils

%description
The zathura-pdf-poppler plugin adds PDF support to zathura by using
the poppler rendering engine.

%prep
%setup -q
%patch0 -p1
# Don't rebuild during install phase
sed -i 's/^install:\s*all/install:/' Makefile

%build
CFLAGS='%{optflags}' make %{?_smp_mflags} LIBDIR=%{_libdir} debug
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
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.metainfo.xml

%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
update-desktop-database &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    %{_sbindir}/update-alternatives --remove \
        %{name} %{_libdir}/zathura/pdf.so.poppler
fi
update-desktop-database &> /dev/null || :

%files
%license LICENSE
%doc AUTHORS
%ghost %{_libdir}/zathura/pdf.so
%{_libdir}/zathura/pdf.so.poppler
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/%{name}.metainfo.xml

%changelog
* Tue Apr 04 2017 Petr Šabata <contyk@redhat.com> - 0.2.7-1
- 0.2.7 bump

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Feb 26 2016 Petr Šabata <contyk@redhat.com> - 0.2.6-1
- 0.2.6 bump

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jul 02 2015 Petr Šabata <contyk@redhat.com> - 0.2.5-8
- Install the desktop file correctly
- Don't package LICENSE twice

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jun 10 2015 Petr Šabata <contyk@redhat.com> - 0.2.5-6
- Rebuild for new girara

* Tue Jun 09 2015 Petr Šabata <contyk@redhat.com> - 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 <rel-eng@lists.fedoraproject.org> - 0.2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Mar 06 2014 François Cami <fcami@fedoraproject.org> - 0.2.5-2
- Bump for rawhide

* Wed Mar 05 2014 François Cami <fcami@fedoraproject.org> - 0.2.5-1
- Update to 0.2.5

* Sat Dec 28 2013 François Cami <fcami@fedoraproject.org> - 0.2.4-1 
- Update to latest upstream.

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed May 29 2013 Petr Šabata <contyk@redhat.com> - 0.2.3-2
- Fix a debuginfo regression (#967954)

* Tue May 21 2013 Petr Šabata <contyk@redhat.com> - 0.2.3-1
- 0.2.3 bump

* Fri Mar 29 2013 Kevin Fenzi <kevin@scrye.com> 0.2.2-1
- Update to 0.2.2

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jan 12 2013 François Cami <fcami@fedoraproject.org> - 0.2.1-5
- force-require zathura.

* Sun Dec 02 2012 François Cami <fcami@fedoraproject.org> - 0.2.1-4
- really remove pre-EL6 stuff.

* Sun Dec 02 2012 François Cami <fcami@fedoraproject.org> - 0.2.1-3
- switch to using RPM_BUILD_ROOT exclusively.
- remove pre-EL6 stuff.

* Wed Nov 28 2012 François Cami <fcami@fedoraproject.org> - 0.2.1-2
- fix BR. Thanks to Dennis Johnson.

* Wed Nov 28 2012 François Cami <fcami@fedoraproject.org> - 0.2.1-1
- new upstream

* Sun Aug 19 2012 François Cami <fcami@fedoraproject.org> - 0.2.0-2
- minor build fixes.

* Fri Aug 10 2012 François Cami <fcami@fedoraproject.org> - 0.2.0-1
- Initial package.