# # spec file for package enscript # # Copyright (c) 2018 SUSE LINUX 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/ # Name: enscript Version: 1.6.6 Release: 1.14 Summary: An ASCII to PostScript(tm) Converter License: GPL-3.0+ Group: Productivity/Publishing/PS Url: http://git.savannah.gnu.org/cgit/enscript.git Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig Source2: enscript-gs-font.map Source3: enscript.sh Patch1: enscript-1.6.4-perl_parens.patch Patch2: enscript-1.6.4-sh_string.patch Patch3: enscript-automake.diff # PATCH-ENHANCE-SUSE -- Add Euro and Baltic support Patch4: enscript-1.6.6-euro+baltic.patch # PATCH-ENHANCE-SUSE -- Add better encoding and automatic paper size support Patch5: enscript-1.6.6-encoding+paper.patch # PATCH-ENHANCE-SUSE -- Add mailto support with optional address Patch6: enscript-1.6.6-mailto.patch # PATCH-ENHANCE-SUSE -- Mention helper app support to manual page Patch7: enscript-1.6.6-helper-apps.patch # PATCH-ENHANCE-SUSE -- Silent the compiler warnings Patch8: enscript-1.6.6-silent-warns.patch # PATCH-ENHANCE-SUSE -- To be able to map fonts from adobe to gs replacement Patch9: enscript-1.6.6-ghostscript.patch BuildRequires: automake Requires: %{_bindir}/file Requires: %{_bindir}/iconv Requires: /bin/sed Requires: ghostscript-fonts-std PreReq: %{install_info_prereq} Provides: genscript Provides: nenscrip %if 0%{?suse_version} >= 1230 BuildRequires: makeinfo %endif %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. ~ ~ %prep %setup -q %patch1 -p0 -b .perl %patch2 -p0 -b .shell %patch3 -p1 %patch4 -p0 -b .euro %patch5 -p0 -b .paper %patch6 -p0 -b .mailto %patch7 -p0 -b .happ %patch8 -p0 -b .nowarns %patch9 -p0 -b .gs %build CFLAGS="%{optflags} -DPROTOTYPES -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 %configure \ --with-spooler=lpr \ --with-media=LC_PAPER \ --with-encoding=LC_CTYPE \ --sysconfdir=%{_sysconfdir}/%{name} pushd lib/ make -f Makefile-encodings %{?_smp_mflags} popd pushd afmlib/ make -f Makefile-encodings %{?_smp_mflags} popd make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" %{?_smp_mflags} %install %make_install ln -sf enscript %{buildroot}%{_bindir}/genscript ln -sf enscript.1 %{buildroot}%{_mandir}/man1/genscript.1 mkdir -p -m 0755 %{buildroot}%{_datadir}/ghostscript/fonts install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/ghostscript/fonts/font.map mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}.bin install -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/%{name} mv %{buildroot}%{_sysconfdir}/%{name}/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}.cfg-new %find_lang %{name} %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %preun %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %files -f %{name}.lang %doc docs/FAQ.html %{_bindir}/diffpp %{_bindir}/%{name} %{_bindir}/%{name}.bin %{_bindir}/genscript %{_bindir}/mkafmmap %{_bindir}/sliceprint %{_bindir}/over %{_bindir}/states %config %{_sysconfdir}/%{name}/%{name}.cfg-new %{_mandir}/man1/diffpp.1%{ext_man} %{_mandir}/man1/enscript.1%{ext_man} %{_mandir}/man1/genscript.1%{ext_man} %{_mandir}/man1/sliceprint.1%{ext_man} %{_mandir}/man1/states.1%{ext_man} %{_datadir}/enscript %dir %{_datadir}/ghostscript %dir %{_datadir}/ghostscript/fonts %{_datadir}/ghostscript/fonts/font.map %{_infodir}/%{name}.info%{ext_info} %changelog * Tue Jan 23 2018 werner@suse.de - Add missing scan vor LC_PAPER in patch enscript-1.6.6-encoding+paper.patch * Tue Jan 23 2018 werner@suse.de - Add enscript-1.6.6-ghostscript.patch to get correct support for ghostscript back * Tue Jan 23 2018 werner@suse.de - Add enscript-1.6.6-silent-warns.patch to silent gcc - Move %%install_info_delete from %%postun to %%preun * Tue Jan 23 2018 werner@suse.de - Add patch enscript-1.6.6-helper-apps.patch to mention helper app support again * Tue Jan 23 2018 werner@suse.de - Add patch enscript-1.6.6-mailto.patch to get mailto support with optional address back * Tue Jan 23 2018 werner@suse.de - Add patch enscript-1.6.6-encoding+paper.patch to get better encoding and automatic paper size support back * Tue Jan 23 2018 werner@suse.de - Add patch enscript-1.6.6-euro+baltic.patch to get support for the Euro symbol as well as the Baltic language support back * Tue Jan 23 2018 avindra@opensuse.org - update to 1.6.6 * Add afm/MustRead.html, containing licensing information for Adobe AFM files. * Sync all translations from the Translation Project. Visit http://translationproject.org/ to help translate Enscript * Add documented but missing '-w' option as an alias for '--language' * Apply sliceprint patch from Debian - includes 1.6.5.2: * Fix CFG_FATAL macro in util.c-- prevents a segfault when the config file contains unknown parameters * Fix segfault with line lengths over 90 characters - includes 1.6.5.1: * Typo corrections in the manual pages * Actually ship f90.st in the tarball * Better organization for ChangeLog, INSTALL and README - includes 1.6.5: * Licensing change: GNU Enscript is now distributed under version 3 or later of the GNU GPL * Build system fixes - distcheck now passes * At least four security bug fixes: - CAN-2004-1184 - CAN-2004-1185 - CAN-2004-1186 - CVE-2008-3863, CVE-2008-4306 * Syntax highlighting fixes - shell escaping rules from Shawn McMahon - JavaScript regexps now recognised - New highlighting rules for Fortran 90 from David Bowler - rebase enscript-automake.diff - remove enscript-1.6.4-CAN-2004-1184.patch * upstreamed in 9510e4315705329e51b27fa2f3f688989b9fb37f - remove enscript-1.6.4-CAN-2004-1185.patch * fixed in a3e6bf57e48bb7434cdd590732e221fd2e0b4c17 - remove enscript-1.6.4-CAN-2004-1186.patch * fixed in 0acc7b63a1be9f5d02f1a21d6df52cb5a9ce7e58 - remove enscript-1.6.4-CVE-2008-3863.patch * upstreamed in 94135714871a735e3fe624eaf37901bbb6314e05 - remove enscript-1.6.4-fdleak.patch * fixed in f2bfb5ead29048ce42000e4796383a4406b069f6 - remove enscript-1.6.4.dif - renumber patches - cleanup with spec-cleaner * Mon Jun 24 2013 werner@suse.de - Make spaces in file name work (bnc#824441) * Fri Apr 26 2013 mmeister@suse.com - Added makeinfo BuildRequire to fix build with new automake * Tue May 29 2012 jengelh@inai.de - Resolve absence of AM_C_PROTOTYPES in new automake-1.12 * Thu Dec 1 2011 coolo@suse.com - add automake as buildrequire to avoid implicit dependency * Sun Sep 18 2011 jengelh@medozas.de - Remove redundant/obsolete tags/sections from specfile (cf. packaging guidelines) - Use %%_smp_mflags for parallel build * Wed Mar 31 2010 werner@suse.de - Fix the wrapepr script to fix bug bnc#590640, bnc#592467, and bnc#592473, this also enhance the fix for bug bnc#478464 and bnc#536348 * Tue Nov 3 2009 coolo@novell.com - updated patches to apply with fuzz=0 * Wed Sep 9 2009 werner@suse.de - Fix problem with getopt behaviour (bnc#536348) * Thu Jul 23 2009 werner@suse.de - Close configuration file after parsing it (bnc#524532) * Wed Jul 15 2009 werner@suse.de - Add patches for syntax highlight from Josh Zenker (bnc#515706) * Mon May 4 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) * Mon Feb 16 2009 ro@suse.de - drop buildreq for lprng * 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 9 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 1 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. * Wed Oct 9 2002 ro@suse.de - removed bogus self-provides (again) * Wed Oct 9 2002 meissner@suse.de - does not need lprng at all (falls back to 'lpr' as default spool) - buildrooted, rpm_opt_flags. * Mon Apr 8 2002 ro@suse.de - fix build with autoconf/gettext * Thu Apr 4 2002 ro@suse.de - autoconf: LIBOBJS vs AC_LIBOBJ * Sat Mar 9 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 7 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 1 2001 schwab@suse.de - Fix quoting in shell script. * Fri Jun 15 2001 schwab@suse.de - Run aclocal and automake before configuring. * Wed May 9 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 2 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 2 1997 florian@suse.de - update to new version 1.4.2 * Thu Jan 2 1997 florian@suse.de new version 1.4.0