Files
enscript/enscript.spec

137 lines
4.6 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package enscript
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: enscript
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
Version: 1.6.6
Release: 0
Summary: An ASCII to PostScript(tm) Converter
License: GPL-3.0-or-later
Group: Productivity/Publishing/PS
URL: http://git.savannah.gnu.org/cgit/enscript.git
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
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
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
BuildRequires: automake
Requires: %{_bindir}/file
Requires: %{_bindir}/iconv
Requires: /bin/sed
Requires: ghostscript-fonts-std
Requires: glibc-locale
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
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
%patch -P 1 -p0 -b .perl
%patch -P 2 -p0 -b .shell
%patch -P 3 -p1
%patch -P 4 -p0 -b .euro
%patch -P 5 -p0 -b .paper
%patch -P 6 -p0 -b .mailto
%patch -P 7 -p0 -b .happ
%patch -P 8 -p0 -b .nowarns
%patch -P 9 -p0 -b .gs
%build
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
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
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
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
%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}
%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
Accepting request 568440 from home:avindra - 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 OBS-URL: https://build.opensuse.org/request/show/568440 OBS-URL: https://build.opensuse.org/package/show/Publishing/enscript?expand=0&rev=25
2018-01-23 07:48:13 +00:00
%doc docs/FAQ.html
%{_bindir}/diffpp
%{_bindir}/%{name}
%{_bindir}/%{name}.bin
%{_bindir}/genscript
%{_bindir}/mkafmmap
%{_bindir}/sliceprint
%{_bindir}/over
%{_bindir}/states
%config %{_sysconfdir}/%{name}.cfg
%{_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