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