File xpdf-poppler.spec of Package xpdf-poppler
#
# spec file for package xpdf-poppler (Version 3.02)
#
# Copyright (c) 2010 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/
#
# norootforbuild
%define releasedate 20071121
Name: xpdf-poppler
BuildRequires: gcc-c++ ghostscript-fonts-std libpoppler-devel openmotif-devel update-desktop-files xorg-x11
License: GPLv2
Group: Productivity/Publishing/PDF
Version: 3.02
Release: 4.<RELEASE6>
AutoReqProv: on
Requires: ghostscript-fonts-std
Summary: A PDF File Viewer for the X Window System
Source0: xpdf-%{version}-poppler-%{releasedate}.tar.bz2
Source1: xpdf.desktop
Source2: xpdf.png
Source3: xpdfrc
# PATCH-FEATURE-UPSTREAM xpdf-poppler-i18n.patch pgajdos@suse.cz
Patch0: %{name}-i18n.patch
Patch1: %{name}-settitle.patch
# PATCH-FEATURE-UPSTREAM xpdf-poppler-search-non-ascii.patch pgajdos@suse.cz
Patch2: %{name}-search-non-ascii.patch
# PATCH-FEATURE-UPSTREAM xpdf-poppler-cut-and-paste-default-output-encoding.patch pgajdos@suse.cz
Patch3: %{name}-cut-and-paste-default-output-encoding.patch
# PATCH-FIX-OPENSUSE xpdf-poppler-crash-in-japanese-locale.patch pgajdos@suse.cz
Patch4: %{name}-crash-in-japanese-locale.patch
# PATCH-FEATURE-UPSTREAM xpdf-poppler-add-and-subtract-key-binding.patch pgajdos@suse.cz
Patch5: %{name}-add-and-subtract-key-binding.patch
# PATCH-FIX-UPSTREAM xpdf-poppler-poppler-0.10.0.patch pgajdos@suse.cz
Patch6: %{name}-poppler-0.10.0.patch
# PATCH-FIX-UPSTREAM xpdf-poppler-cxx-flags.patch pgajdos@suse.cz
Patch7: %{name}-cxx-flags.patch
# PATCH-FIX-OPENSUSE xpdf-poppler-xpdfrc.5-reference.patch pgajdos@suse.cz
Patch8: %{name}-xpdfrc.5-reference.patch
# PATCH-FIX-UPSTREAM xpdf-poppler-disable-autohinting.patch
Patch9: %{name}-autohinting-as-option.patch
# PATCH-FIX-UPSTREAM xpdf-poppler-private-textpage-destructor.patch pgajdos@suse.cz
Patch10: %{name}-private-textpage-destructor.patch
# PATCH-FIX-UPSTREAM xpdf-poppler-getCMap-arguments.patch pgajdos@suse.cz
Patch11: %{name}-getCMap-arguments.patch
Patch12: %{name}-set-icon.patch
Patch13: %{name}-no-goto-when-fullscreen.patch
Patch14: %{name}-pimage-null.patch
Url: http://www.foolabs.com/xpdf/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: xpdf
Provides: xpdf
%description
This tool is used for viewing PDF (Portable Document Format) files. It
is designed to be small and efficient.
Authors:
--------
Derek B. Noonburg <derekn@foolabs.com>
%prep
%setup -q -n xpdf-%{version}-poppler
%patch0 -p2
#%patch1 -p2 -- seems not to be needed
%patch2 -p2
%patch3 -p2
%patch4 -p2
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8
%patch9
%patch10
%patch11
%patch12 -p1
%patch13
%patch14 -p1
%build
export CXXFLAGS="$RPM_OPT_FLAGS -DSYSTEM_XPDFRC=\\\"/etc/xpdfrc\\\""
export CFLAGS="$RPM_OPT_FLAGS"
make
%install
mkdir -p %{buildroot}%{_bindir}
install -m 755 xpdf %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 xpdf.1 %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}%{_datadir}/applications/
install -m 644 %{S:1} %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}%{_datadir}/pixmaps/
install -m 644 %{S:2} %{buildroot}%{_datadir}/pixmaps/
mkdir %{buildroot}/etc
install -m 644 %{S:3} %{buildroot}/etc
%suse_update_desktop_file -i xpdf Office Viewer
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc ANNOUNCE README CHANGES
%{_bindir}/xpdf
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*
%doc %{_mandir}/man1/xpdf.1*
%config(noreplace) /etc/xpdfrc
%changelog