File enscript.spec of Package enscript
#
# spec file for package enscript (Version 1.6.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: enscript
BuildRequires: lprng
License: GPL v2 or later
Group: Productivity/Publishing/PS
Provides: genscript nenscrip
Requires: /bin/sed /usr/bin/iconv /usr/bin/file ghostscript-fonts-std
PreReq: %install_info_prereq
AutoReqProv: on
Version: 1.6.4
Release: 152.<RELEASE13>
Summary: An ASCII to PostScript(tm) Converter
Source: enscript-%{version}.tar.bz2
Source1: enscript-gs-font.map
Source2: enscript.sh
Patch: enscript-%{version}.dif
Patch1: enscript-1.6.4-CAN-2004-1184.patch
Patch2: enscript-1.6.4-CAN-2004-1185.patch
Patch3: enscript-1.6.4-CAN-2004-1186.patch
Patch4: enscript-1.6.4-CVE-2008-3863.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Enscript converts ASCII files to PostScript and writes the generated
output to a file or sends it directly to the printer.
The Enscript configuration file is in /etc/enscript.cfg.
Warning: enscript is not able to convert complex unicode (UTF-8) text
to PostScript. Only language text which can be converted from UTF-8 to
latin encodings are supported with the help of a wrapper script. ~ ~
Authors:
--------
Markku Rossi <mtr@iki.fi>
%prep
%setup -q
%patch -P 1 -p 1 -b .CAN-2004-1184
%patch -P 2 -p 1 -b .CAN-2004-1185
%patch -P 3 -p 1 -b .CAN-2004-1186
%patch -P 4 -p 0 -b .CVE-2008-3863
%patch
%build
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -funroll-loops -Wall -fno-strict-aliasing -pipe -fstack-protector"
LDFLAGS=
export CC CFLAGS LDFLAGS
AUTOPOINT=true autoreconf --force --install
test ! -f po/Makevars.template || mv po/Makevars.template po/Makevars
sh ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-media=LC_PAPER \
--with-encoding=LC_CTYPE
pushd lib/
make -f Makefile-encodings
popd
pushd afmlib/
make -f Makefile-encodings
popd
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
%install
make install DESTDIR=$RPM_BUILD_ROOT
ln -sf enscript $RPM_BUILD_ROOT/usr/bin/genscript
ln -sf enscript.1 $RPM_BUILD_ROOT%{_mandir}/man1/genscript.1
mkdir -p -m 0755 $RPM_BUILD_ROOT%{_datadir}/ghostscript/fonts
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/ghostscript/fonts/font.map
mv $RPM_BUILD_ROOT/usr/bin/enscript $RPM_BUILD_ROOT/usr/bin/enscript.bin
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/bin/enscript
%find_lang %{name}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files -f %{name}.lang
%defattr(-,root,root)
%doc docs/ChangeLog docs/FAQ.html
/usr/bin/diffpp
/usr/bin/enscript
/usr/bin/enscript.bin
/usr/bin/genscript
/usr/bin/mkafmmap
/usr/bin/sliceprint
/usr/bin/over
/usr/bin/states
%config /etc/enscript.cfg
%doc %{_mandir}/man1/diffpp.1.gz
%doc %{_mandir}/man1/enscript.1.gz
%doc %{_mandir}/man1/genscript.1.gz
%doc %{_mandir}/man1/sliceprint.1.gz
%doc %{_mandir}/man1/states.1.gz
/usr/share/enscript
%dir /usr/share/ghostscript
%dir /usr/share/ghostscript/fonts
/usr/share/ghostscript/fonts/font.map
%doc %{_infodir}/%{name}.info.gz
%changelog
* Mon May 04 2009 werner@suse.de
- Fix the last fix
* Fri Feb 27 2009 werner@suse.de
- Make sure that titles including white spaces will be printed
* Thu Feb 26 2009 werner@suse.de
- Do not add empty strings to long options without argument e.g.
--color (bnc#478464)
* Wed Oct 29 2008 werner@suse.de
- Fix more overflows for bnc#433756, CVE-2008-3863, CVE-2008-4306
* Tue Oct 14 2008 werner@suse.de
- Avoid buffer overflow in setfilename (bnc#433756, CVE-2008-3863)
* Tue Jul 15 2008 werner@suse.de
- Better workaround for UTF-8 files
* Sun Feb 24 2008 crrodriguez@suse.de
- use find_lang macro
* Tue Oct 09 2007 werner@suse.de
- Fix usage of -w within binary and manual page (bug #331840)
* Mon Nov 13 2006 werner@suse.de
- Be aware that whitespace between the options -C, -e, -E, -H, and
-u and their arguments are not allowed with enscript (bug #215754)
* Sat Oct 21 2006 schwab@suse.de
- Fix use of autoreconf.
* Wed May 24 2006 schwab@suse.de
- Don't strip binaries.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006 werner@suse.de
- Use the gcc stack protector
* Fri May 13 2005 werner@suse.de
- Add a wrapper script for converting UTF-8 text _partly_ into the
natural latin encoding of the given language enviroment (#43348)
* Thu Feb 10 2005 lnussel@suse.de
- fix patch for CAN-2004-1186 (#49680)
* Tue Feb 01 2005 werner@suse.de
- Add three security fixes CAN-2004-1184,1185,1186 (bug #49680)
* Fri Aug 20 2004 werner@suse.de
- Update to 1.6.4
- Skip --install for autoreconf call
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Tue Sep 23 2003 werner@suse.de
- Use AFM and Fonts of ghostscript if available (bug #31589)
* Thu Apr 24 2003 ro@suse.de
- fix install_info --delete call and move from preun to postun
* Fri Feb 28 2003 werner@suse.de
- Fix bug #23407: use intall-info for info file
* Mon Nov 18 2002 schwab@suse.de
- Add AM_GNU_GETTEXT_VERSION.
* Thu Oct 10 2002 meissner@suse.de
- The datafiles also need to be installed to the buildroot.
* Thu Oct 10 2002 werner@suse.de
- For the full functionality a lpr (at compile time) is required.
* Thu Oct 10 2002 ro@suse.de
- removed bogus self-provides (again)
* Wed Oct 09 2002 meissner@suse.de
- does not need lprng at all (falls back to 'lpr' as default spool)
- buildrooted, rpm_opt_flags.
* Tue Apr 09 2002 ro@suse.de
- fix build with autoconf/gettext
* Fri Apr 05 2002 ro@suse.de
- autoconf: LIBOBJS vs AC_LIBOBJ
* Sat Mar 09 2002 ro@suse.de
- replaced lprold by lprng in neededforbuild
* Wed Jan 16 2002 werner@suse.de
- tmpnam -> mkstemp (make secure temporary file)
* Fri Dec 07 2001 werner@suse.de
- Make Euro work with ghostscript based printers
- Use keywords LC_PAPER and LC_CTYPE for getting
paper size and encoding
- The option -m of enscript now accepts a mailto argument.
- Move from Makefile.Linux to spec
* Mon Oct 01 2001 schwab@suse.de
- Fix quoting in shell script.
* Fri Jun 15 2001 schwab@suse.de
- Run aclocal and automake before configuring.
* Wed May 09 2001 mfabian@suse.de
- bzip2 sources
* Fri Feb 25 2000 kukuk@suse.de
- Move /usr/{info,man} -> /usr/share/{info,man}
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Jun 29 1999 uli@suse.de
- update -> 1.6.2
* Mon Mar 02 1998 florian@suse.de
- update to new version 1.5.5
* Thu Nov 13 1997 ro@suse.de
- added lprold as neededforbuild
* Fri Oct 10 1997 florian@suse.de
- update to new version 1.5.1
* Thu Jan 02 1997 florian@suse.de
- update to new version 1.4.2
* Thu Jan 02 1997 florian@suse.de
new version 1.4.0