Blob Blame History Raw
Summary: Converts text and other types of files to PostScript(TM).
Name: a2ps
Version: 4.13b
Release: 52
License: 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
Patch5: a2ps-4.13-varargs.patch
Patch6: a2ps-tmpdir.patch
Patch7: a2ps-sort.patch
# EUC-JP support
Patch10: a2ps-4.13-eucjp.patch.bz2
Patch11: a2ps-4.13-autoenc.patch
Patch12: a2ps-4.13b-attr.patch
Patch13: a2ps-4.13b-numeric.patch
Patch14: a2ps-4.13b-encoding.patch
Patch15: a2ps-4.13b-tilde.patch
Patch16: a2ps-4.13b-rm.patch
Patch17: a2ps-4.13-euckr.patch
Patch18: a2ps-4.13-gnusource.patch
Patch19: a2ps-4.13-bison.patch
Patch20: a2ps-4.13-hebrew.patch
Patch21: a2ps-4.13-malloc.patch
Patch22: a2ps-shell.patch
Patch23: a2ps-includes.patch
Patch24: a2ps-underquoted.patch
Patch25: a2ps-autoconf.patch
Patch26: a2ps-make-fonts-map.patch
Patch27: a2ps-netscape.patch
Patch28: a2ps-wdiff.patch
Patch29: a2ps-U.patch
Requires: fileutils sh-utils info
BuildRequires: /usr/bin/emacs, gperf, flex, libtool, texinfo
Url: http://www.inf.enst.fr/~demaille/a2ps/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: psutils
PreReq: sed, coreutils
Obsoletes: a2ps-i18n
Provides: a2ps-i18n

# Temp exclude on ppc64 as no emacs there right now
ExcludeArch: ppc64

BuildRequires: gettext

%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
%patch5 -p1
%patch6 -p1 -b .tmpdir
%patch7 -p1 -b .sort

%patch10 -p1 -b .euc
%patch11 -p1 -b .ae
%patch12 -p1 -b .attr

# Use C locale's decimal point style (bug #53715).
%patch13 -p1 -b .numeric

# Use locale to determine a sensible default encoding (bug #64584).
%patch14 -p1 -b .encoding

# Fix koi8 tilde (bug #66393).
%patch15 -p1 -b .tilde

# Prevent configure from going interactive (bug #70333).
%patch16 -p1 -b .rm

# Add Korean resource file (bug #81421).
%patch17 -p1 -b .euckr

# Prevent strsignal segfaulting (bug #104970).
%patch18 -p1 -b .gnusource

# Fix problems in .y file spotted by stricter bison.
%patch19 -p1 -b .bison

# Hebrew support (bug #113191).
%patch20 -p1 -b .hebrew

# Prevent "error: conflicting types for 'malloc'".
%patch21 -p1 -b .malloc

# Use environment variable to pass filenames to shell (bug #128647).
%patch22 -p1 -b .shell

# Apply patch from bug #122699 to fix "too many includes" error.
%patch23 -p1 -b .includes

# Fixed m4 files.
%patch24 -p1 -b .underquoted

# Fixed configure.in.
%patch25 -p1 -b .autoconf

# Fix problems in make_fonts_map script (bug #142299).  Patch from
# Michal Jaegermann.
%patch26 -p1 -b .make-fonts-map

# Don't try to run netscape.  Run mozilla instead (bug #121393).
%patch27 -p1 -b .netscape

# Make pdiff default to not requiring wdiff (bug #68537).
%patch28 -p1 -b .wdiff

# Make pdiff use diff(1) properly (bug #156916).
%patch29 -p1 -b .U

# Fix reference to a2ps binary (bug #112930).
perl -pi -e "s,/usr/local/bin,%{_bindir}," contrib/emacs/a2ps.el
libtoolize --copy --force
cp /usr/share/aclocal/libtool.m4 m4/
aclocal -I m4
autoconf

%build
chmod 644 {po/ja.po,encoding/euc-jp.edf,README.eucJP}.euc
chmod 644 encoding/euc-kr.edf.euckr
touch `find $PWD`
EMACS=emacs ./configure \
  --prefix=%{_prefix} \
  --libdir=%{_libdir} \
  --sysconfdir=%{_sysconfdir} \
  --infodir=%{_infodir} \
  --mandir=%{_mandir} \
  --datadir=%{_datadir} \
  --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 CFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

mkdir -p %{buildroot}%{_datadir}/a2ps/{afm,fonts}
pushd i18n-fonts-0.1/afm
install -m 0644 *.afm %{buildroot}%{_datadir}/a2ps/afm
pushd ../fonts
install -m 0644 *.pfb %{buildroot}%{_datadir}/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
}

rm -f $RPM_BUILD_ROOT%{_infodir}/dir
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}/*.a
%{_libdir}/*.la
%{_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
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 4.13b-52
- rebuild
- exclude ppc64 as no emacs there right now.
- get rid of stupid ver and rel defines.

* Tue May 30 2006 Tim Waugh <twaugh@redhat.com> 4.13b-51
- Build requires gettext (bug #193346).

* Tue Apr  4 2006 Tim Waugh <twaugh@redhat.com> 4.13b-50
- Use sort correctly in make_font_map.sh (bug #187884).

* Wed Feb 15 2006 Tim Waugh <twaugh@redhat.com> 4.13b-49
- Use mktemp in scripts.

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 4.13b-48.3
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 4.13b-48.2.2
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Fri Nov 18 2005 Bill Nottingham <notting@redhat.com> 4.13b-48
- Migrate font paths from /usr/X11R6 to /usr/share/X11

* Thu May  5 2005 Tim Waugh <twaugh@redhat.com> 4.13b-47
- Make pdiff use diff(1) properly (bug #156916).

* Wed Mar 23 2005 Tim Waugh <twaugh@redhat.com> 4.13b-46
- Make pdiff default to not requiring wdiff (bug #68537).

* Wed Mar  2 2005 Tim Waugh <twaugh@redhat.com> 4.13b-45
- Rebuild for new GCC.

* Wed Feb  2 2005 Tim Waugh <twaugh@redhat.com> 4.13b-44
- Don't try to run netscape.  Run mozilla instead (bug #121393).

* Thu Dec  9 2004 Tim Waugh <twaugh@redhat.com> 4.13b-43
- Fixed font path (bug #142294).
- Fixed problems in make_fonts_map script (bug #142299).  Patch from
  Michal Jaegermann.

* Tue Dec  7 2004 Tim Waugh <twaugh@redhat.com> 4.13b-42
- Fixed configure.in.
- Fixed m4 files.
- Apply patch from bug #122699 to fix "too many includes" error.

* Tue Oct  5 2004 Tim Waugh <twaugh@redhat.com> 4.13b-41
- Build requires texinfo (bug #134663).

* Thu Jul 29 2004 Tim Waugh <twaugh@redhat.com> 4.13b-40
- Use environment variable to pass filenames to shell (bug #128647).

* Thu Jun 24 2004 Tim Waugh <twaugh@redhat.com> 4.13b-39
- Build requires libtool (bug #125823).

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon Mar 22 2004 Tim Waugh <twaugh@redhat.com> 4.13b-37
- Build requires flex (bug #118892).

* Wed Mar  3 2004 Tim Waugh <twaugh@redhat.com> 4.13b-36
- Oops, use system C compiler.

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Mar  2 2004 Tim Waugh <twaugh@redhat.com> 4.13b-35
- Prevent "error: conflicting types for 'malloc'".

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Jan 16 2004 Tim Waugh <twaugh@redhat.com> 4.13b-33
- Post scriptlet requires sed, coreutils (bug #107322).

* Mon Jan 12 2004 Tim Waugh <twaugh@redhat.com> 4.13b-32
- Hebrew support (bug #113191).

* Tue Jan  6 2004 Tim Waugh <twaugh@redhat.com> 4.13b-31
- Build requires gperf.
- Fix problems in .y file spotted by stricter bison.
- Fix reference to a2ps binary (bug #112930).

* Fri Oct 17 2003 Tim Waugh <twaugh@redhat.com> 4.13b-30
- Prevent strsignal segfaulting (bug #104970).

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Thu Jan  9 2003 Tim Waugh <twaugh@redhat.com> 4.13b-27
- Add Korean resource file (bug #81421).

* Tue Jan  7 2003 Jeff Johnson <jbj@redhat.com> 4.13b-26
- don't include -debuginfo files in package.

* Wed Nov 20 2002 Tim Powers <timp@redhat.com>
- rebuild on all arches
- remove lingering files from the buildroot that we aren't shipping
- pass %%{_libdir} and %%{_datadir} to configure so that we are lib64'ized
- fix bad perms on some files

* Mon Aug  5 2002 Tim Waugh <twaugh@redhat.com> 4.13b-24
- Prevent configure from going interactive (bug #70333).
- Try to cope with UTF-8 a little bit (bug #70057).

* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 4.13b-23
- automated rebuild

* Fri Jun 21 2002 Tim Waugh <twaugh@redhat.com> 4.13b-22
- Fix koi8 tilde (bug #66393).

* Thu May 30 2002 Tim Waugh <twaugh@redhat.com> 4.13b-21
- Provide a2ps-i18n (bug #65231).
- Fix default encoding (bug #64584).

* Thu May 23 2002 Tim Powers <timp@redhat.com> 4.13b-20
- automated rebuild

* Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 4.13b-19
- Rebuild in new environment.

* Tue Jan 22 2002 Tim Waugh <twaugh@redhat.com> 4.13b-18
- Fix a2ps-4.13-conf.patch (bug #31360).
- Add documentation about the default behaviour concerning LC_PAPER
  (bug #43829).

* Wed Jan 09 2002 Tim Powers <timp@redhat.com> 4.13b-17
- automated rebuild

* Wed Jan  9 2002 Tim Waugh <twaugh@redhat.com>
- Fix build with newer compiler.
- s/Copyright:/License:/.
- Use C locale's decimal point style (bug #53715).

* Fri Jun  1 2001 Oliver Paukstadt <oliver.paukstadt@millenux.com>
- fixed varargs-usage in title.c

* Thu Apr 26 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- call libtoolize to allow easy porting to new archs

* Thu Feb 28 2001 SATO Satoru <ssato@redhat.com>
- bunzip2-ed all patches except eucjp

* Thu Feb 22 2001 SATO Satoru <ssato@redhat.com>
- 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 <teg@redhat.com>
- 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 <timp@redhat.com>
- changed default medium back to letter (bug 27794)

* Mon Feb 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
- langify
- use %%{_tmppath}

* Mon Feb 12 2001 Tim Waugh <twaugh@redhat.com>
- Fix tmpfile security patch so that it actually _works_ (bug #27155).

* Sun Jan 21 2001 Tim Waugh <twaugh@redhat.com>
- 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 <teg@redhat.com>
- Add /usr/bin/emacs to BuildRequires
- A4
- specify use of GNU Emacs for building

* Fri Jan 05 2001 Preston Brown <pbrown@redhat.com>
- security patch for tmpfile creation from Olaf Kirch <okir@lst.de>

* Mon Dec 11 2000 Preston Brown <pbrown@redhat.com>
- obsoleted old a2ps-i18n package (it was tiny) and included those fonts
  directly here.

* Thu Dec  7 2000 Tim Powers <timp@redhat.com>
- built for dist-7.1

* Mon Aug 07 2000 Tim Powers <timp@redhat.com>
- 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 <prospector@redhat.com>
- rebuilt

* Mon Jul 10 2000 Tim Powers <timp@redhat.com>
- rebuilt

* Fri Jun 23 2000 Tim Powers <timp@redhat.com>
- info pages weren't getting gzipped.
- stdout & stderror redirected to /dev/null in post section

* Mon Jun 19 2000 Tim Powers <timp@redhat.com>
- 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 <timp@redhat.com>
- 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 <timp@rehat.com>
- fixed bug #11078, now requires psutils

* Wed Apr 26 2000 Tim Powers <timp@redhat.com>
- updated to 4.13
- compress man pages

* Thu Feb 10 2000 Tim Powers <timp@redhat.com>
- gzip man pages
- strip binaries

* Mon Jan 24 2000 Tim Powers <timp@redhat.com>
- 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 <timp@redhat.com>
- added the --with-medium=Letter option to the configure process

* Thu Aug 5 1999 Tim Powers <timp@redhat.com>
- fixed problems with missing dirs as reported in bug 3822
- built for powertools

* Tue Jul 6 1999 Tim Powers <timp@redhat.com>
- rebuilt for powertools 6.1

* Wed May 12 1999 Bill Nottingham <notting@redhat.com>
- add a2ps-site.cfg

* Mon Apr 26 1999 Preston Brown <pbrown@redhat.com>
- update to 4.12 for Powertools 6.0

* Sat Oct 24 1998 Jeff Johnson <jbj@redhat.com>
- narrower range of %files splats.
- install info correctly.
- new description/summary text.

* Tue Oct 06 1998 Michael Maher <mike@redhat.com>
- updated source

* Sat Jul 04 1998 Michael Maher <mike@redhat.com>
- built package