adb95b6
%global _hardened_build 1
50c167c
Name:           diffpdf
f34b6ac
Version:        2.1.3
b370ed8
Release:        11%{?dist}
50c167c
Summary:        PDF files comparator
50c167c
50c167c
Group:          Applications/Text
50c167c
License:        GPLv2+
50c167c
URL:            http://www.qtrac.eu/diffpdf.html
2159ae3
Source0:        http://www.qtrac.eu/%{name}-%{version}.tar.gz
fe05e31
Source1:        %{name}.1
50c167c
Source3:        %{name}.desktop
50c167c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
50c167c
691178a
BuildRequires:  poppler-qt4-devel, desktop-file-utils, ImageMagick
00028b4
# /usr/include/poppler/cpp/poppler-version.h
00028b4
BuildRequires:  poppler-cpp-devel
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
00028b4
lrelease-qt4 diffpdf.pro
Rex Dieter 6e2a682
%{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
fe05e31
%{__install} -m 644 %{SOURCE1} -D $RPM_BUILD_ROOT%{_mandir}/man1/diffpdf.1
fe05e31
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,-)
00028b4
%doc CHANGES gpl-2.0.txt help_cz.html help_de.html help_fr.html help.html README
2159ae3
%{_bindir}/%{name}
50c167c
%{_datadir}/icons/hicolor/??x??/apps/*.png
50c167c
%{_datadir}/applications/%{name}.desktop
fe05e31
%{_mandir}/man1/diffpdf.1*
50c167c
00028b4
50c167c
%changelog
b370ed8
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-11
b370ed8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b370ed8
3d8f85e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-10
3d8f85e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3d8f85e
fe05e31
* Fri Nov 25 2016 Jonathan Wakely <jwakely@redhat.com> - 2.1.3-9
fe05e31
- Add man page.
fe05e31
6482c6f
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-8
6482c6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6482c6f
Rex Dieter 6e2a682
* Tue Feb 02 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-7
Rex Dieter 6e2a682
- use %%qmake_qt4 macro to ensure proper build flags
Rex Dieter 6e2a682
3f69915
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-6
3f69915
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3f69915
7d2f6c6
* Sun May 03 2015 Kalev Lember <kalevlember@gmail.com> - 2.1.3-5
7d2f6c6
- Rebuilt for GCC 5 C++11 ABI change
7d2f6c6
e763df5
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-4
e763df5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e763df5
f0f127b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-3
f0f127b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f0f127b
adb95b6
* Sun Oct 20 2013 Till Maas <opensource@till.name> - 2.1.3-2
adb95b6
- Harden build
adb95b6
f34b6ac
* Sun Oct 20 2013 Till Maas <opensource@till.name> - 2.1.3-1
f34b6ac
- Update to new release
f34b6ac
05e1476
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.2-3
05e1476
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
05e1476
9015f89
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.2-2
9015f89
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9015f89
f528bf9
* Wed Jan 09 2013 Till Maas <opensource@till.name> - 2.1.2-1
f528bf9
- Update to new release
f528bf9
00028b4
* Tue Oct 02 2012 Till Maas <opensource@till.name> - 2.1.1-1
00028b4
- Update to new release
00028b4
fb0e0db
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-5
fb0e0db
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fb0e0db
6002846
* Wed May 16 2012 Marek Kasik <mkasik@redhat.com> - 1.2.2-4
6002846
- Rebuild (poppler-0.20.0)
6002846
4650c90
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-3
4650c90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4650c90
fe583cd
* Mon Sep 19 2011 Marek Kasik <mkasik@redhat.com> - 1.2.2-2
fe583cd
- Rebuild (poppler-0.17.3)
fe583cd
98511da
* Mon Jul 25 2011 Till Maas <opensource@till.name> - 1.2.2-1
98511da
- Update to new release
98511da
a1d5ab4
* Fri Jul 15 2011 Marek Kasik <mkasik@redhat.com> - 1.0.0-3
a1d5ab4
- Rebuild (poppler-0.17.0)
a1d5ab4
b7a1677
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
b7a1677
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b7a1677
a4a34cd
* Wed May 19 2010 Thomas Janssen <thomasj@fedoraproject.org> 1.0.0-1
a4a34cd
- diffpdf 1.0.0 new/improved algorithm
a4a34cd
2159ae3
* Sat May 01 2010 Thomas Janssen <thomasj@fedoraproject.org> 0.6.0-1
2159ae3
- diffpdf 0.6.0
2159ae3
57a539f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-6
57a539f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
57a539f
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