234 lines
7.9 KiB
RPMSpec
234 lines
7.9 KiB
RPMSpec
%define majver %(echo %version | cut -dp -f1)
|
|
%define minver %(echo %{version}p | cut -dp -f2)
|
|
Name: xpdf
|
|
Version: 4.03
|
|
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: https://www.xpdfreader.com
|
|
Source0: https://dl.xpdfreader.com/xpdf-%{version}.tar.gz
|
|
Source1: https://dl.xpdfreader.com/xpdf-arabic.tar.gz
|
|
Source2: https://dl.xpdfreader.com/xpdf-chinese-simplified.tar.gz
|
|
Source3: https://dl.xpdfreader.com/xpdf-chinese-traditional.tar.gz
|
|
Source4: https://dl.xpdfreader.com/xpdf-cyrillic.tar.gz
|
|
Source5: https://dl.xpdfreader.com/xpdf-greek.tar.gz
|
|
Source6: https://dl.xpdfreader.com/xpdf-hebrew.tar.gz
|
|
Source7: https://dl.xpdfreader.com/xpdf-japanese.tar.gz
|
|
Source8: https://dl.xpdfreader.com/xpdf-korean.tar.gz
|
|
Source9: https://dl.xpdfreader.com/xpdf-latin2.tar.gz
|
|
Source10: https://dl.xpdfreader.com/xpdf-thai.tar.gz
|
|
Source11: https://dl.xpdfreader.com/xpdf-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: glibc-devel
|
|
BuildRequires: ldconfig
|
|
BuildRequires: libcups-devel
|
|
BuildRequires: libfontconfig-devel
|
|
BuildRequires: libfreetype-devel
|
|
BuildRequires: libgcc
|
|
BuildRequires: libpaper-devel
|
|
BuildRequires: libqt5-devel
|
|
BuildRequires: libstdc++6-devel
|
|
## AUTOBUILDREQ-END
|
|
Requires: ghostscript-fonts >= 6.0
|
|
Requires: libpoppler-tools
|
|
|
|
%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.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -n %{name}-%{majver}
|
|
#%patch0 -p1 -b .fonts
|
|
#%patch2 -p1 -b .xpdfrc
|
|
%if "%{minver}" != ""
|
|
patch -p1 < %{SOURCE13}
|
|
patch -p1 < %{SOURCE14}
|
|
%endif
|
|
%patch6 -p1 -b .can_2005_2097
|
|
#%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
|
|
%cmake -d build \
|
|
-DMULTITHREADED=ON \
|
|
-DOPI_SUPPORT=ON \
|
|
-DXPDFWIDGET_PRINTING=ON \
|
|
-DSYSTEM_XPDFRC=%{_sysconfdir}/xpdfrc \
|
|
-DCMAKE_C_FLAGS="%{optflags} -fPIC" \
|
|
-DCMAKE_CXX_FLAGS="%{optflags} -fPIC" \
|
|
|
|
%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 -C build
|
|
|
|
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/xpdfrc,g' {} \;
|
|
sed -i 's,/usr/local/share/,/usr/share/,g' \
|
|
%{buildroot}/%{_mandir}/man5/xpdfrc.5
|
|
|
|
install -D -m644 doc/sample-xpdfrc %{buildroot}%{_sysconfdir}/xpdfrc
|
|
|
|
install -D -m644 %{SOURCE12} \
|
|
%{buildroot}%{_datadir}/applications/xpdf.desktop
|
|
|
|
install -D -m644 xpdf-qt/xpdf-icon.svg %{buildroot}%{_datadir}/pixmaps/xpdf.svg
|
|
|
|
# remove stuff provided by poppler
|
|
rm -f %{buildroot}%{_bindir}/pdf*
|
|
rm -f %{buildroot}%{_mandir}/man1/pdf*.1*
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config %{_sysconfdir}/xpdfrc
|
|
%{_bindir}/xpdf
|
|
%dir %{_datadir}/xpdf
|
|
%{_datadir}/xpdf/*
|
|
%{_datadir}/applications/xpdf.desktop
|
|
%{_datadir}/pixmaps/xpdf.svg
|
|
%{_mandir}/man1/xpdf.1*
|
|
%{_mandir}/man5/xpdfrc.5*
|
|
%doc COPYING
|
|
#%doc ANNOUNCE CHANGES COPYING README
|
|
|
|
%changelog
|
|
* Mon Mar 22 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.03-1mamba
|
|
- update to 4.03
|
|
|
|
* Thu May 14 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.02-1mamba
|
|
- update to 4.02
|
|
|
|
* 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
|