File diffpdf.spec of Package diffpdf
#
# spec file for package diffpdf
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: diffpdf
Version: 2.1.3
Release: 0
License: GPL-2.0+
Summary: PDF Files Comparator
Url: http://www.qtrac.eu/diffpdf.html
Group: Productivity/Publishing/PDF
Source0: http://www.qtrac.eu/%{name}-%{version}.tar.gz
BuildRequires: ImageMagick
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(poppler-qt4)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
DiffPDF is used to compare two PDF files, textually or visually.
%prep
%setup -q
%build
lrelease diffpdf_*.ts
qmake \
QMAKE_CXXFLAGS+="%{optflags}" \
QMAKE_CFLAGS+="%{optflags}" \
QMAKE_STRIP="true"
make %{?_smp_mflags}
%install
install -Dm 0755 %{name} \
%{buildroot}%{_bindir}/%{name}
install -Dm 0644 %{name}.1 \
%{buildroot}%{_mandir}/man1/%{name}.1
install -Dm 0644 images/icon.png \
%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
for size in 48x48 32x32 22x22 16x16 ; do
install -dm 0755 \
%{buildroot}%{_datadir}/icons/hicolor/${size}/apps
convert -resize ${size} images/icon.png \
%{buildroot}%{_datadir}/icons/hicolor/${size}/apps/%{name}.png
done
%suse_update_desktop_file -c %{name} DiffPDF "PDF Files Comparator" %{name} %{name} Development Documentation Office Viewer
%post
%icon_theme_cache_post
%postun
%icon_theme_cache_postun
%files
%defattr(-,root,root,-)
%doc CHANGES gpl-2.0.txt README help*.html
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}.*
%doc %{_mandir}/man?/*
%changelog