%define urwdir %{_datadir}/fonts/default/Type1 %define usefreetype2 1 Summary: A PDF file viewer for the X Window System Name: xpdf Version: 1.01 Release: 4mdk License: GPL Source: ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{version}.tar.bz2 Source1: icons-%{name}.tar.bz2 Source2: ftp://ftp.foolabs.com/pub/xpdf/%{name}-chinese-simplified.tar.bz2 Source3: ftp://ftp.foolabs.com/pub/xpdf/%{name}-chinese-traditional.tar.bz2 Source4: ftp://ftp.foolabs.com/pub/xpdf/%{name}-cyrillic.tar.bz2 Source5: ftp://ftp.foolabs.com/pub/xpdf/%{name}-japanese.tar.bz2 Source6: ftp://ftp.foolabs.com/pub/xpdf/%{name}-korean.tar.bz2 Source7: ftp://ftp.foolabs.com/pub/xpdf/%{name}-thai.tar.bz2 Patch1: %{name}-1.00-zapf.patch.bz2 Patch2: %{name}-1.00-antihigh.patch.bz2 Patch3: %{name}-1.00-mozilla.patch.bz2 Patch4: %{name}-1.01-chinese-simplified.patch.bz2 URL: http://www.foolabs.com/xpdf/ Group: Office BuildRequires: XFree86-devel BuildRequires: xpm-devel BuildRequires: t1lib-devel BuildRequires: freetype2-devel >= 2.0.5 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: t1lib >= 1.0, urw-fonts %description Xpdf is an X Window System based viewer for Portable Document Format (PDF) files. PDF files are sometimes called Acrobat files, after Adobe Acrobat (Adobe's PDF viewer). Xpdf is a small and efficient program which uses standard X fonts. %prep %setup -q -a2 -a3 -a4 -a5 -a6 -a7 %patch1 -p1 -b .zapf %patch2 -p1 -b .antihigh %patch3 -p1 -b .mozilla %patch4 -p1 -b .chinese %build %configure --with-gzip \ --bindir=%{_bindir} \ --mandir=%{_mandir} \ --enable-a4-paper \ --enable-opi \ %if %usefreetype2 --enable-freetype2 \ --with-freetype2-includes=%{_includedir}/freetype2 \ %endif --enable-japanese \ --enable-chinese-gb \ --enable-chinese-cns make urwdir=%{urwdir} perl -pi -e 's@/usr/local/etc/@%{_sysconfdir}/@' doc/*.1 doc/*.5 perl -pi -e 's@/usr/local/share/ghostscript/fonts@%{urwdir}@' doc/sample-xpdfrc doc/*.1 doc/*.5 perl -pi -e 's@^#displayFontT1@displayFontT1@' doc/sample-xpdfrc for i in chinese-simplified chinese-traditional cyrillic japanese korean thai; do perl -pi -e 's@/usr/local/share/xpdf@%{_datadir}/xpdf@' \ xpdf-$i/add-to-xpdfrc \ xpdf-$i/README echo >> doc/sample-xpdfrc cat xpdf-$i/add-to-xpdfrc >> doc/sample-xpdfrc rm xpdf-$i/add-to-xpdfrc done %install rm -rf %{buildroot} install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_menudir} make DESTDIR=%{buildroot} install for i in chinese-simplified chinese-traditional cyrillic japanese korean thai; do mkdir -p %{buildroot}%{_datadir}/%{name}/$i cp -a xpdf-$i/* %{buildroot}%{_datadir}/%{name}/$i/ done cat > %{buildroot}%{_menudir}/xpdf <<EOF ?package(xpdf): command="xpdf" needs="X11" \ icon="xpdf.png" section="Applications/Publishing" title="Xpdf" \ longtitle="Views PDF files" EOF # mdk icons install -d %{buildroot}%{_iconsdir} tar xjf %SOURCE1 -C %{buildroot}%{_iconsdir} %post %update_menus %postun %clean_menus %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc CHANGES README %{_bindir}/* %{_mandir}/man1/* %{_mandir}/man5/* %{_menudir}/* %{_iconsdir}/* %{_liconsdir}/* %{_miconsdir}/* %{_datadir}/%{name}/* %config(noreplace) %{_sysconfdir}/xpdfrc %changelog * Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.01-4mdk - Automated rebuild with gcc 3.2-0.3mdk * Thu Jul 25 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.01-3mdk - Automated rebuild with gcc3.2 * Thu Jun 13 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.01-2mdk - Fixed a bug for the Chinese simplified (report by <wtzhu@ustc.edu>). * Fri May 24 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.01-1mdk - New release: 1.01. - Use dynamic version of freetype2 library. * Sun Mar 03 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.00-2mdk - added changes netscape -> mozilla. - added missed xpdfrc man page. * Sat Feb 02 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.00-1mdk - updated to release 1.0. - enabled freetype2 support. - readapted -zapf and -antihigh patches. - png icons. - added CMap files for Chinese-simplified, Chinese-traditional, Cyrillic, Japanese, Korean, Thai. * Mon Oct 29 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.93-2mdk - added (conditional) freetype2 support, but disabled because PDF files currently files looks ugly when freetype2 enabled. - renamed patches. - added Patch4). - %%make reverted to make (it no longer works with freetype2 enabled). - currently freetype * Sun Oct 28 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.93-1mdk - 0.93, linked with t1lib 1.3. * Thu Aug 23 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.92-5mdk - rebuilt with latest t1lib 1.2. * Wed Jun 13 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 0.92-4mdk - New office menu structure - Correct icons * Tue Mar 13 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.92-3mdk - removed unused patches. - build with new t1lib. * Sun Jan 07 2001 David BAUDENS <baudens@mandrakesoft.com> 0.92-2mdk - s/Copyright/License - Fix BuildRequires - Spec clean up * Mon Dec 04 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.92-1mdk - new and shiny version. - remove rgb patch (#7) for it seems to have been merged with the source. - re-enable Chinese and Japanese, why was it ever removed? - standard directory ownership problem, fixed. * Fri Nov 17 2000 David BAUDENS <baudens@mandrakesoft.com> 0.91-7mdk - Rebuild with gcc-2.96 & glibc-2.2 * Mon Oct 09 2000 Daouda Lo <daouda@mandrakesoft.com> 0.91-6mdk - build with generic optflags (ghibo ) * Mon Oct 09 2000 Daouda Lo <daouda@mandrakesoft.com> 0.91-5mdk - icons * Sat Oct 07 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.91-4mdk - fixed 0.91-t1urw patch. * Sat Oct 07 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.91-3mdk - re-adapted patch 0.90-t1urw to version 0.91 (it allows to use Type1 URW fonts for standard PDF 14 fonts for better quality). * Fri Oct 06 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.91-2mdk - fixed a typo in %post and %postun scripts. - added icons. - added rgb, patch from RedHat. - enabled opi. * Tue Aug 15 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.91-1mdk - s|0.90|0.91| aka decrypt me babe. - remove the font patch. * Wed Aug 09 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.90-11mdk - BM - spechelper * Tue Aug 08 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.90-10mdk - automatically added BuildRequires * Fri Apr 21 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.90-9mdk - removed xpdf.desktop also from the %install stage. * Sat Apr 01 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.90-8mdk - updated for t1lib 1.0.1. - added things for new menu entry. - removed xpdf.desktop. * Thu Mar 02 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.90-7mdk - increased default antialias font level from low to high. Files look nicer. * Tue Feb 08 2000 Geoffrey Lee <snailtalk@linux-mandrake.com> 0.90-6mdk - Correct the URL in the spec file - remove egcs as build require * Thu Jan 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.90-5mdk - Fix build as non-root. * Sat Dec 18 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com> - fixed a bug for Times-Italic and Helvetica-BoldOblique name in URW fonts. * Tue Dec 07 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Fix for gcc-2.95. * Fri Nov 11 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com> - built for Oxygen. * Mon Sep 27 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com> - added patch to use aliased Type 1 URW fonts by default for standard 14 PDF fonts. - added Preston Brown <pbrown@redhat.com>'s zapf patch. * Wed Aug 11 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com> - update to version 0.90. - strip binaries. - added t1lib dependencies. * Thu May 6 1999 Bernhard Rosenkränzer <bero@mandrakesoft.com> - Mandrake adaptions - handle RPM_OPT_FLAGS * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 4) * Wed Mar 17 1999 Preston Brown <pbrown@redhat.com> - converted wmconfig to desktop entry * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com> - Injected new description and group. * Mon Nov 30 1998 Preston Brown <pbrown@redhat.com> - updated to 0.80 * Fri Nov 06 1998 Preston Brown <pbrown@redhat.com> - patched to compile with new, stricter egcs * Tue May 05 1998 Cristian Gafton <gafton@redhat.com> - updated to 0.7a * Thu Nov 20 1997 Otto Hammersmith <otto@redhat.com> - added changelog - added wmconfig