xpdf/xpdf.spec

238 lines
8.2 KiB
RPMSpec
Raw Permalink Normal View History

#%define majver %(echo %version | cut -d. -f1)
#%define minver %(echo %version | cut -d. -f2)
%define majver %(echo %version | cut -dp -f1)
%define minver %(echo %{version}p | cut -dp -f2)
Name: xpdf
Version: 3.04
Release: 1mamba
Summary: An open source viewer for Portable Document Format (PDF) files
Group: Graphical Desktop/Applications/Publishing
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.foolabs.com/xpdf/index.html
Source0: ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{majver}.tar.gz
Source1: ftp://ftp.foolabs.com/pub/xpdf/%{name}-arabic.tar.gz
Source2: ftp://ftp.foolabs.com/pub/xpdf/%{name}-chinese-simplified.tar.gz
Source3: ftp://ftp.foolabs.com/pub/xpdf/%{name}-chinese-traditional.tar.gz
Source4: ftp://ftp.foolabs.com/pub/xpdf/%{name}-cyrillic.tar.gz
Source5: ftp://ftp.foolabs.com/pub/xpdf/%{name}-greek.tar.gz
Source6: ftp://ftp.foolabs.com/pub/xpdf/%{name}-hebrew.tar.gz
Source7: ftp://ftp.foolabs.com/pub/xpdf/%{name}-japanese.tar.gz
Source8: ftp://ftp.foolabs.com/pub/xpdf/%{name}-korean.tar.gz
Source9: ftp://ftp.foolabs.com/pub/xpdf/%{name}-latin2.tar.gz
Source10: ftp://ftp.foolabs.com/pub/xpdf/%{name}-thai.tar.gz
Source11: ftp://ftp.foolabs.com/pub/xpdf/%{name}-turkish.tar.gz
Source12: xpdf-xpdf_desktop
#%if "%{minver}" != ""
#Source13: ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{majver}pl1.patch
#Source14: ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{majver}p%{minver}.patch
#%endif
Patch0: %{name}-2.03-fonts.patch
Patch1: %{name}-3.00-gcc4.patch
Patch2: %{name}-3.04-xpdfrc.patch
Patch4: %{name}-3.01-crash.patch
Patch5: %{name}-3.00-can_2005_0206.patch
Patch6: %{name}-3.01-can_2005_2097.patch
Patch7: %{name}-3.01-can_2005_3191_2_3.patch
Patch8: %{name}-3.01-can_2005_3624_5_6_7.patch
Patch9: %{name}-3.01-cve_2006_0301.patch
Patch10: %{name}-3.03-libXpm-3.5.10.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: ghostscript-fonts
BuildRequires: glibc-devel
BuildRequires: libfreetype-devel
BuildRequires: libgcc
BuildRequires: libICE-devel
BuildRequires: liblesstif-devel
BuildRequires: libpaper-devel
BuildRequires: libSM-devel
BuildRequires: libstdc++6-devel
BuildRequires: libt1-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXp-devel
BuildRequires: libXpm-devel
BuildRequires: libXt-devel
## AUTOBUILDREQ-END
Requires: ghostscript-fonts >= 6.0
Requires: libpoppler-tools
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Xpdf is an open source viewer for Portable Document Format (PDF) files.
(These are also sometimes also called 'Acrobat' files, from the name of Adobe's PDF software.)
The Xpdf project also includes a PDF text extractor, PDF-to-PostScript converter, and various other utilities.
%prep
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -n %{name}-%{majver}
%patch0 -p1 -b .fonts
#%patch1 -p1 -b .gcc4
%patch2 -p1 -b .xpdfrc
%if "%{minver}" != ""
patch -p1 < %{SOURCE13}
patch -p1 < %{SOURCE14}
%endif
#%patch4 -p1 -b .crash
#%patch5 -p1 -b .can_2005_2006
%patch6 -p1 -b .can_2005_2097
#%patch7 -p1 -b .can_2005_3191_2_3
#%patch8 -p1 -b .can_2005_3624_5_6_7
#%patch9 -p1 -b .cve_2006_0301
%patch10 -p1
languages='
arabic
chinese-simplified
chinese-traditional
cyrillic
greek
hebrew
japanese
korean
latin2
thai
turkish'
> languages.lst
for lang in $languages; do echo "$lang" >> languages.lst; done
%build
# FIXME: -D__STRICT_ANSI__ needed as long as gcc provides a fixed header
# for paper.h
%configure \
--sysconfdir=%{_sysconfdir}/X11/xpdf \
--enable-freetype2 \
--with-freetype2-includes=%{_includedir}/freetype2 \
--with-appdef-dir=%{_datadir}/X11/app-defaults \
--enable-a4-paper \
--enable-opi \
CXXFLAGS="-g -O2 -D__STRICT_ANSI__"
# --enable-wordlist
%make
for lang in `cat languages.lst`; do
sed -i '
s,/usr/local/share/xpdf,%{_datadir}/xpdf,g
s,/usr/local/etc/xpdfrc,%{_sysconfdir}/X11/xpdf/xpdfrc,g' \
xpdf-$lang/{add-to-xpdfrc,README}
echo >> doc/sample-xpdfrc
cat xpdf-$lang/add-to-xpdfrc >> doc/sample-xpdfrc
rm xpdf-$lang/add-to-xpdfrc
done
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
for lang in `cat languages.lst`; do
install -d %{buildroot}%{_datadir}/%{name}/$lang
cp -a xpdf-$lang/* %{buildroot}%{_datadir}/%{name}/$lang/
done
# fix wrong paths
find %{buildroot}/%{_mandir}/man? -type f -name "*.[15]" \
-exec sed -i 's,/usr/local/etc/xpdfrc,/etc/X11/xpdf/xpdfrc,g' {} \;
sed -i 's,/usr/local/share/,/usr/share/,g' \
%{buildroot}/%{_mandir}/man5/xpdfrc.5
install -D -m644 %{SOURCE12} \
%{buildroot}%{_datadir}/applications/xpdf.desktop
rm -f %{buildroot}%{_bindir}/pdf*
rm -f %{buildroot}%{_mandir}/man1/pdf*.1*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/X11/xpdf
%config %{_sysconfdir}/X11/xpdf/xpdfrc
%{_bindir}/xpdf
%dir %{_datadir}/xpdf
%{_datadir}/xpdf/*
%{_datadir}/applications/xpdf.desktop
%{_mandir}/man1/xpdf.1.gz
%{_mandir}/man5/xpdfrc.5.gz
%doc COPYING
#%doc ANNOUNCE CHANGES COPYING README
%changelog
* Sun Dec 13 2015 Automatic Build System <autodist@mambasoft.it> 3.04-1mamba
- automatic update by autodist
* Mon Oct 24 2011 Automatic Build System <autodist@mambasoft.it> 3.03-1mamba
- update to 3.03
* Wed Jun 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.02pl4-3mamba
- don't install pdf* man pages provided by libpoppler-tools 0.13
* Thu Dec 03 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.02pl4-2mamba
- don't provide pdf conversion tools but use libpoppler-tools (added as requirement)
* Sat Oct 24 2009 Automatic Build System <autodist@mambasoft.it> 3.02pl4-1mamba
- automatic update by autodist
* Fri Jul 10 2009 Automatic Build System <autodist@mambasoft.it> 3.02pl3-1mamba
- automatic update by autodist
* Tue Dec 30 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.02pl2-1mamba
- update to 3.02pl2
* Tue Jul 15 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.02-1mamba
- update to 3.02
* Thu Apr 27 2006 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-7qilnx
- fixed desktop file
* Fri Feb 03 2006 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-6qilnx
- security update for CVE-2006-0301 (qibug#122)
* Fri Jan 20 2006 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-5qilnx
- security update for CVE-2005-2006, and CVE-2005-362[4,5,6,7] (qibug#105)
* Tue Dec 13 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-4qilnx
- fixed desktop file
* Wed Dec 07 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-3qilnx
- security fix CAN-2005-3193 (qibug#90)
* Wed Nov 09 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-2qilnx
- added desktop file
* Mon Aug 22 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.01-1qilnx
- update to version 3.01 by autospec
- fixed security issue QSA-2005-090 (CAN-2005-2097)
* Mon Feb 14 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.00-2qilnx
- rebuilt with new libt1 libraries
* Thu Jan 20 2005 Davide Madrisan <davide.madrisan@qilinux.it> 3.00-1qilnx
- update to version 3.00 by autospec
- fixed security issue QSA-2005-003 (CAN-2004-1125)
- added support for arabic, chinese-simplified, chinese-traditional,
cyrillic, greek, hebrew, japanese, korean, latin2, thai, turkish
* Sat Nov 27 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.03-4qilnx
- fixed size of `times-medium-r-normal' in XPDFViewer.cc
* Sat Oct 30 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.03-3qilnx
- added a patch to customize the xpdf configuration file:
- ghostscript and TTF fonts path fixed/added
- font anti-aliasing enabled
- paper size default set to A4
- default printer set to kprinter (KDE printer)
- browser for URL hyperlink set to konqueror
- added the requirement `ghostscript-fonts'
* Thu Oct 28 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.03-2qilnx
- security fix (QSA-2004-047): CAN-2004-0888
* Mon Jan 12 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.03-1qilnx
- package updated
* Thu Sep 25 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.02pl1-1qilnx
- first build