2a16fb3
Name:           diffpdf
2a16fb3
Version:        0.3.8
fb20594
Release:        4%{?dist}
2a16fb3
Summary:        PDF files comparator
2a16fb3
2a16fb3
Group:          Applications/Text
2a16fb3
License:        GPLv2+
2a16fb3
URL:            http://www.qtrac.eu/diffpdf.html
2a16fb3
Source0:        http://www.qtrac.eu/diffpdf-%{version}.tar.gz
2a16fb3
Source3:        %{name}.desktop
2a16fb3
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2a16fb3
fb20594
BuildRequires:  poppler-qt4-devel, desktop-file-utils, ImageMagick
2a16fb3
Requires:       hicolor-icon-theme
2a16fb3
2a16fb3
%description
2a16fb3
DiffPDF is used to compare two PDF files. By default the comparison is
2a16fb3
of the text on each pair of pages, but comparing the appearance of pages
2a16fb3
is also supported (for example, if a diagram is changed or a paragraph
2a16fb3
reformatted). It is also possible to compare particular pages or page
2a16fb3
ranges.
2a16fb3
2a16fb3
%prep
2a16fb3
%setup -q
2a16fb3
2a16fb3
2a16fb3
%build
2a16fb3
qmake-qt4
2a16fb3
make %{?_smp_mflags}
2a16fb3
2a16fb3
2a16fb3
%install
2a16fb3
rm -rf $RPM_BUILD_ROOT
2a16fb3
mkdir -p $RPM_BUILD_ROOT%{_bindir}
2a16fb3
install -m 755 diffpdf $RPM_BUILD_ROOT%{_bindir}
2a16fb3
2a16fb3
for f in 32 16; do
2a16fb3
   mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/"$f"x$f/apps
2a16fb3
   convert images/icon.png -size "$f"x$f diffpdf-$f.png
2a16fb3
   install -p diffpdf-$f.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/"$f"x$f/apps/diffpdf.png
2a16fb3
done
2a16fb3
2a16fb3
desktop-file-install                                    \
2a16fb3
  --dir=$RPM_BUILD_ROOT%{_datadir}/applications         \
2a16fb3
  %{SOURCE3}
2a16fb3
2a16fb3
%post
2a16fb3
touch --no-create %{_datadir}/icons/hicolor
2a16fb3
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
2a16fb3
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
2a16fb3
fi
2a16fb3
2a16fb3
2a16fb3
%postun
2a16fb3
touch --no-create %{_datadir}/icons/hicolor
2a16fb3
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
2a16fb3
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
2a16fb3
fi
2a16fb3
2a16fb3
%clean
2a16fb3
rm -rf $RPM_BUILD_ROOT
2a16fb3
2a16fb3
2a16fb3
%files
2a16fb3
%defattr(-,root,root,-)
2a16fb3
%doc gpl-2.0.txt boson1.pdf boson2.pdf README
2a16fb3
%{_bindir}/diffpdf
2a16fb3
%{_datadir}/icons/hicolor/??x??/apps/*.png
2a16fb3
%{_datadir}/applications/%{name}.desktop
2a16fb3
2a16fb3
2a16fb3
%changelog
fb20594
* Sun Dec 14 2008 Rafał Psota <rafalzaq@gmail.com> - 0.3.8-4
fb20594
- forgot about ImageMagick
2a16fb3
* Fri Dec 12 2008 Rafał Psota <rafalzaq@gmail.com> - 0.3.8-3
2a16fb3
- drop vendor for desktop file
2a16fb3
* Thu Nov 27 2008 Rafał Psota <rafalzaq@gmail.com> - 0.3.8-2
2a16fb3
- forgot about desktop file
2a16fb3
* Tue Nov 11 2008 Rafał Psota <rafalzaq@gmail.com> - 0.3.8-1
2a16fb3
- Initial release