Install the desktop file correctly

- Don't package LICENSE twice
epel9
Petr Šabata 10 years ago
parent 0494ae21a6
commit 8ea7b75b5d

@ -1,6 +1,6 @@
Name: zathura-pdf-poppler Name: zathura-pdf-poppler
Version: 0.2.5 Version: 0.2.5
Release: 7%{?dist} Release: 8%{?dist}
Summary: PDF support for zathura via poppler Summary: PDF support for zathura via poppler
License: zlib License: zlib
URL: http://pwmt.org/projects/zathura/plugins/%{name} URL: http://pwmt.org/projects/zathura/plugins/%{name}
@ -17,7 +17,9 @@ BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(zathura) BuildRequires: pkgconfig(zathura)
Requires: zathura Requires: zathura
Requires(post): %{_sbindir}/update-alternatives Requires(post): %{_sbindir}/update-alternatives
Requires(post): desktop-file-utils
Requires(postun): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives
Requires(postun): desktop-file-utils
%description %description
The zathura-pdf-poppler plugin adds PDF support to zathura by using The zathura-pdf-poppler plugin adds PDF support to zathura by using
@ -37,6 +39,7 @@ make DESTDIR=%{buildroot} LIBDIR=%{_libdir} install
mv %{buildroot}/%{_libdir}/zathura/pdf.so \ mv %{buildroot}/%{_libdir}/zathura/pdf.so \
%{buildroot}/%{_libdir}/zathura/pdf.so.poppler %{buildroot}/%{_libdir}/zathura/pdf.so.poppler
touch %{buildroot}/%{_libdir}/zathura/pdf.so touch %{buildroot}/%{_libdir}/zathura/pdf.so
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%pre %pre
[ -L %{_libdir}/zathura/pdf.so ] || rm -f %{_libdir}/zathura/pdf.so [ -L %{_libdir}/zathura/pdf.so ] || rm -f %{_libdir}/zathura/pdf.so
@ -44,21 +47,27 @@ touch %{buildroot}/%{_libdir}/zathura/pdf.so
%post %post
%{_sbindir}/update-alternatives --install \ %{_sbindir}/update-alternatives --install \
%{_libdir}/zathura/pdf.so %{name} %{_libdir}/zathura/pdf.so.poppler 10 %{_libdir}/zathura/pdf.so %{name} %{_libdir}/zathura/pdf.so.poppler 10
update-desktop-database &> /dev/null || :
%postun %postun
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove \ %{_sbindir}/update-alternatives --remove \
%{name} %{_libdir}/zathura/pdf.so.poppler %{name} %{_libdir}/zathura/pdf.so.poppler
fi fi
update-desktop-database &> /dev/null || :
%files %files
%license LICENSE %license LICENSE
%doc AUTHORS LICENSE %doc AUTHORS
%ghost %{_libdir}/zathura/pdf.so %ghost %{_libdir}/zathura/pdf.so
%{_libdir}/zathura/pdf.so.poppler %{_libdir}/zathura/pdf.so.poppler
%{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}.desktop
%changelog %changelog
* 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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

Loading…
Cancel
Save