%define ver 4.13b %define rel 14 Summary: Converts text and other types of files to PostScript(TM). Name: a2ps Version: %{ver} Release: %{rel} Copyright: GPL Group: Applications/Publishing Source: ftp://ftp.enst.fr/pub/unix/a2ps/%{name}-%{version}.tar.gz Source1: ftp://ftp.enst.fr/pub/unix/a2ps/i18n-fonts-0.1.tar.gz Patch0: a2ps-4.13-conf.patch Patch1: a2ps-4.13-etc.patch Patch2: a2ps-4.13-flex.patch Patch3: a2ps-4.13-security.patch Patch4: a2ps-4.13-glibcpaper.patch # EUC-JP support Patch10: a2ps-4.13-eucjp.patch.bz2 Patch11: a2ps-4.13-autoenc.patch Requires: fileutils sh-utils info Buildrequires: /usr/bin/emacs Url: http://www.inf.enst.fr/~demaille/a2ps/ BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: psutils Obsoletes: a2ps-i18n %description The a2ps filter converts text and other types of files to PostScript(TM). A2ps has pretty-printing capabilities and includes support for a wide number of programming languages, encodings (ISO Latins, Cyrillic, etc.), and medias. %prep %setup -q -n %{name}-4.13 -a 1 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 -b .security %patch4 -p1 -b .glibcpaper %patch10 -p1 -b .euc %patch11 -p1 -b .ae libtoolize --copy --force %build touch `find $PWD` EMACS=emacs ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --infodir=/usr/share/info \ --mandir=/usr/share/man \ --with-medium=_glibc \ --enable-kanji # Remove prebuilt info files to force regeneration at build time find . -name "*.info*" -exec rm -f {} \; # force rebuilding scanners by flex - patched or not find src lib -name '*.l' -exec touch {} \; # these scanners use 'lineno' - incompatible with -CFe flex flags ( cd src /bin/sh ../auxdir/ylwrap "flex" sheets-map.l lex.yy.c sheets-map.c -- /bin/sh ../auxdir/ylwrap "flex" lexssh.l lex.yy.c lexssh.c -- cd ../lib /bin/sh ../auxdir/ylwrap "flex" lexppd.l lex.yy.c lexppd.c -- ) make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install mkdir -p %{buildroot}/usr/share/a2ps/{afm,fonts} pushd i18n-fonts-0.1/afm install -m 0644 *.afm %{buildroot}/usr/share/a2ps/afm pushd ../fonts install -m 0644 *.pfb %{buildroot}/usr/share/a2ps/fonts popd popd ### FIXME ### inst() { mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/ for f in contrib/emacs/*.el; do \ install -m 0644 $f %{buildroot}%{_datadir}/emacs/site-lisp/ ; done } gzip $RPM_BUILD_ROOT%{_infodir}/* || : %find_lang %name %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_infodir}/a2ps.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/ogonkify.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/regex.info.gz %{_infodir}/dir (cd %{_datadir}/a2ps/afm; ./make_fonts_map.sh > /dev/null 2>&1 || /bin/true if [ -f fonts.map.new ]; then mv fonts.map.new fonts.map fi ) %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/a2ps.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/ogonkify.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/regex.info.gz %{_infodir}/dir fi %files -f %{name}.lang %defattr(-,root,root) %config (noreplace) %{_sysconfdir}/a2ps.cfg %config(noreplace) %{_sysconfdir}/a2ps-site.cfg %doc AUTHORS ChangeLog COPYING NEWS README TODO THANKS %{_bindir}/* %{_libdir}/* %{_includedir}/* %{_infodir}/a2ps.info* %{_infodir}/ogonkify.info* %{_infodir}/regex.info* %{_mandir}/*/* %config %{_datadir}/a2ps/afm/fonts.map %{_datadir}/a2ps/afm/*.afm %{_datadir}/a2ps/afm/make_fonts_map.sh %{_datadir}/a2ps/README %{_datadir}/a2ps/encoding %{_datadir}/a2ps/fonts %{_datadir}/a2ps/ppd %{_datadir}/a2ps/ps %{_datadir}/a2ps/sheets %{_datadir}/ogonkify/ %{_datadir}/emacs/site-lisp/* %dir %{_datadir}/a2ps/afm %dir %{_datadir}/a2ps %changelog * Thu Apr 26 2001 Florian La Roche - call libtoolize to allow easy porting to new archs * Thu Feb 28 2001 SATO Satoru - bunzip2-ed all patches except eucjp * Thu Feb 22 2001 SATO Satoru - support Japanese - bzip2-ed all patches - replace macros (%%makeinstall, %%configure) with traditional commands to avoid some troubles those macros caused. * Tue Feb 20 2001 Trond Eivind Glomsrød - Using letter is as weird as oz, fl. oz, Fahrenheit, lb etc. Add a patch for using the glibc media type for giving US letter for en_US (only locale with this paper), and A4 for everyone else. * Tue Feb 20 2001 Tim Powers - changed default medium back to letter (bug 27794) * Mon Feb 19 2001 Trond Eivind Glomsrød - langify - use %%{_tmppath} * Mon Feb 12 2001 Tim Waugh - Fix tmpfile security patch so that it actually _works_ (bug #27155). * Sun Jan 21 2001 Tim Waugh - New-style prereq line. - %%post script requires fileutils (mv) and sh-utils (true). This should fix bug #24251). * Mon Jan 08 2001 Trond Eivind Glomsrød - Add /usr/bin/emacs to BuildRequires - A4 - specify use of GNU Emacs for building * Fri Jan 05 2001 Preston Brown - security patch for tmpfile creation from Olaf Kirch * Mon Dec 11 2000 Preston Brown - obsoleted old a2ps-i18n package (it was tiny) and included those fonts directly here. * Thu Dec 7 2000 Tim Powers - built for dist-7.1 * Mon Aug 07 2000 Tim Powers - update to 4.13b to fix some bugs, thanks to czar@acm.org for giving me a heads up on this (bug #15679) * Mon Jul 24 2000 Prospector - rebuilt * Mon Jul 10 2000 Tim Powers - rebuilt * Fri Jun 23 2000 Tim Powers - info pages weren't getting gzipped. - stdout & stderror redirected to /dev/null in post section * Mon Jun 19 2000 Tim Powers - fixed bug 12451 which was a stupid mistake by me. - quiet the post section - added patches from michal@ellpspace.math.ualberta.ca and did some spec file magic he suggested as well. * Fri Jun 2 2000 Tim Powers - fixed bug 5876, was not setting the paper size to Letter again :( - man pages and info pages to /usr/share, FHS compliant. - used macros wherever possible * Wed May 31 2000 Tim Powers - fixed bug #11078, now requires psutils * Wed Apr 26 2000 Tim Powers - updated to 4.13 - compress man pages * Thu Feb 10 2000 Tim Powers - gzip man pages - strip binaries * Mon Jan 24 2000 Tim Powers - had to be more specific since the i18n stuff was removed from the package. There is a new a2ps-i18n package which treats the /usr/share/a2ps/afm/fonts.map file as a config file * Wed Oct 27 1999 Tim Powers - added the --with-medium=Letter option to the configure process * Thu Aug 5 1999 Tim Powers - fixed problems with missing dirs as reported in bug 3822 - built for powertools * Tue Jul 6 1999 Tim Powers - rebuilt for powertools 6.1 * Wed May 12 1999 Bill Nottingham - add a2ps-site.cfg * Mon Apr 26 1999 Preston Brown - update to 4.12 for Powertools 6.0 * Sat Oct 24 1998 Jeff Johnson - narrower range of %files splats. - install info correctly. - new description/summary text. * Tue Oct 06 1998 Michael Maher - updated source * Sat Jul 04 1998 Michael Maher - built package