You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zathura-pdf-mupdf/zathura-pdf-mupdf.spec

84 lines
2.6 KiB

Name: zathura-pdf-mupdf
Version: 0.2.8
Release: 5%{?dist}
Summary: PDF support for zathura via mupdf
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: pkgconfig
BuildRequires: sed
BuildRequires: jbig2dec-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: mujs-static
BuildRequires: mupdf-devel
BuildRequires: openjpeg2-devel
BuildRequires: pkgconfig(zathura)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(girara-gtk3)
BuildRequires: pkgconfig(libcrypto)
Requires: zathura
Requires(post): %{_sbindir}/update-alternatives
Requires(post): desktop-file-utils
Requires(postun): %{_sbindir}/update-alternatives
Requires(postun): desktop-file-utils
# Ensure zathura-pdf-poppler supports alternatives
Conflicts: zathura-pdf-poppler < 0.2.5-5
%description
This plugin adds PDF support to zathura using the mupdf rendering engine.
%prep
%setup -q
# 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.mupdf
touch %{buildroot}/%{_libdir}/zathura/pdf.so
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%post
%{_sbindir}/update-alternatives --install \
%{_libdir}/zathura/pdf.so %{name} %{_libdir}/zathura/pdf.so.mupdf 5
update-desktop-database &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove \
%{name} %{_libdir}/zathura/pdf.so.mupdf
fi
update-desktop-database &> /dev/null || :
%files
%license LICENSE
%doc AUTHORS
%ghost %{_libdir}/zathura/pdf.so
%{_libdir}/zathura/pdf.so.mupdf
%{_datadir}/applications/%{name}.desktop
%changelog
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Nov 16 2015 Petr Šabata <contyk@redhat.com> - 0.2.8-4
- Rebuild with mujs-0-1.20150929git0827611
* Wed Jul 01 2015 Petr Šabata <contyk@redhat.com> - 0.2.8-3
- Handle the desktop file properly
* Tue Jun 23 2015 Petr Šabata <contyk@redhat.com> - 0.2.8-2
- Correct the %%files section
* Tue Jun 09 2015 Petr Šabata <contyk@redhat.com> - 0.2.8-1
- Initial packaging