2007-01-15 23:50:44 +01:00
|
|
|
#
|
2011-09-19 08:31:59 +02:00
|
|
|
# spec file for package a2ps
|
2007-01-15 23:50:44 +01:00
|
|
|
#
|
2015-05-25 02:52:16 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-15 23:50:44 +01:00
|
|
|
#
|
2008-10-27 16:38:28 +01:00
|
|
|
# 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.
|
|
|
|
|
2007-01-15 23:50:44 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-05-29 15:43:29 +02:00
|
|
|
|
2007-01-15 23:50:44 +01:00
|
|
|
Name: a2ps
|
2014-08-09 20:32:57 +02:00
|
|
|
Version: 4.14
|
2012-02-08 13:25:23 +01:00
|
|
|
Release: 0
|
2007-01-15 23:50:44 +01:00
|
|
|
Summary: Converts ASCII Text into PostScript
|
2014-09-17 21:28:15 +02:00
|
|
|
License: GPL-3.0+
|
2012-02-08 13:25:23 +01:00
|
|
|
Group: Productivity/Publishing/PS
|
2015-05-25 02:52:16 +02:00
|
|
|
Url: http://www.gnu.org/software/a2ps/a2ps.html
|
|
|
|
Source0: http://ftp.gnu.org/gnu/a2ps/%{name}-%{version}.tar.gz
|
|
|
|
Source1: http://ftp.gnu.org/gnu/a2ps/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source2: %{name}.keyring
|
|
|
|
Source3: a2ps-ko.po
|
|
|
|
Source4: a2ps-open
|
|
|
|
Patch0: a2ps-4.14.diff
|
2007-01-15 23:50:44 +01:00
|
|
|
Patch1: a2ps-4.13-security.patch
|
2014-08-09 20:32:57 +02:00
|
|
|
Patch2: a2ps-4.14-ogonkify.patch
|
|
|
|
Patch3: a2ps-4.14-tempfile.patch
|
2015-03-03 13:11:06 +01:00
|
|
|
Patch4: a2ps-4.14-automake.patch
|
2007-01-15 23:50:44 +01:00
|
|
|
Patch6: a2ps-4.13-include.patch
|
2014-08-09 20:32:57 +02:00
|
|
|
Patch7: a2ps-4.14-acroread.patch
|
2007-01-15 23:50:44 +01:00
|
|
|
Patch8: a2ps-4.13-base.patch
|
2008-07-15 21:14:13 +02:00
|
|
|
Patch9: a2ps-4.13-utf8.patch
|
2008-10-27 16:38:28 +01:00
|
|
|
Patch10: a2ps-4.13-types.patch
|
2009-08-28 21:09:03 +02:00
|
|
|
Patch11: a2ps-4.13-psgen.patch
|
2015-03-03 12:58:57 +01:00
|
|
|
Patch12: a2ps-4.14-iswprint.patch
|
2014-08-09 20:32:57 +02:00
|
|
|
Patch13: a2ps-4.14-linker.patch
|
2014-03-31 10:09:40 +02:00
|
|
|
# PATCH-FIX-USTREAM Bug 871097 - CVE-2014-0466: a2ps: fixps does not use -dSAFER
|
|
|
|
Patch14: CVE-2014-0466.diff
|
2015-05-25 02:52:16 +02:00
|
|
|
Patch15: a2ps-4.14-gperf.patch
|
2015-11-16 16:23:08 +01:00
|
|
|
# PATCH-FIX-SUSE Bug 955194 - CVE-2015-8107: CVE-2015-8107 - a2ps(gnu) v4.14 format string vulnerability
|
|
|
|
Patch16: a2ps-4.14-bnc955194.patch
|
2015-05-25 02:52:16 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: emacs-nox
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: ghostscript-fonts-std
|
|
|
|
BuildRequires: gv
|
|
|
|
BuildRequires: psutils
|
|
|
|
BuildRequires: texlive-latex
|
|
|
|
Requires: file
|
|
|
|
Requires: ghostscript-fonts-std
|
|
|
|
Requires: glibc
|
|
|
|
Requires: sed
|
|
|
|
Requires: w3m
|
|
|
|
Requires: wdiff
|
|
|
|
# FIXME: use proper Requires(pre/post/preun/...)
|
|
|
|
PreReq: %{install_info_prereq}
|
|
|
|
Requires(post): %{install_info_prereq}
|
|
|
|
Requires(preun): %{install_info_prereq}
|
|
|
|
Suggests: ImageMagick
|
|
|
|
Suggests: acroread
|
|
|
|
Suggests: gv
|
|
|
|
Suggests: psutils
|
|
|
|
Suggests: texinfo
|
|
|
|
Suggests: texlive-latex
|
|
|
|
Provides: a2ps-bin
|
2007-01-15 23:50:44 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-05-25 02:52:16 +02:00
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
BuildRequires: gperf
|
|
|
|
BuildRequires: groff
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: texi2html
|
|
|
|
BuildRequires: texinfo
|
|
|
|
%endif
|
2007-01-15 23:50:44 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
a2ps converts ASCII text into PostScript. This feature is used by
|
|
|
|
apsfilter, for example, to pretty-print ASCII text.
|
|
|
|
|
2008-10-27 16:38:28 +01:00
|
|
|
Warning: a2ps 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.
|
|
|
|
|
|
|
|
%package -n a2ps-devel
|
|
|
|
Summary: Library and header file for the interface of a2ps
|
2009-08-28 21:09:03 +02:00
|
|
|
Group: Development/Libraries/Other
|
2012-05-29 15:43:29 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: glibc-devel
|
2015-05-25 02:52:16 +02:00
|
|
|
Provides: a2ps:%{_libdir}/liba2ps.a
|
2008-10-27 16:38:28 +01:00
|
|
|
|
|
|
|
%description -n a2ps-devel
|
|
|
|
a2ps converts ASCII text into PostScript. This feature is used by
|
|
|
|
apsfilter, for example, to pretty-print ASCII text.
|
|
|
|
|
|
|
|
Warning: a2ps 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.
|
|
|
|
|
2007-01-15 23:50:44 +01:00
|
|
|
%prep
|
2014-08-09 20:32:57 +02:00
|
|
|
%setup -q -n a2ps-4.14
|
2007-01-15 23:50:44 +01:00
|
|
|
touch -r configure.in .ref
|
2015-05-25 02:52:16 +02:00
|
|
|
%patch1 -b .security
|
2015-03-02 13:09:08 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2015-05-25 02:52:16 +02:00
|
|
|
%patch4 -b .norefresh
|
2015-03-02 13:09:08 +01:00
|
|
|
%patch6 -p1 -b .incld
|
2007-01-15 23:50:44 +01:00
|
|
|
%ifarch %ix86 x86_64
|
2015-05-25 02:52:16 +02:00
|
|
|
%patch7 -p1
|
2007-01-15 23:50:44 +01:00
|
|
|
%endif
|
2015-05-25 02:52:16 +02:00
|
|
|
%patch8 -b .base
|
|
|
|
%patch9 -b .utf8
|
|
|
|
%patch10 -b .types
|
|
|
|
%patch11 -b .psgen
|
|
|
|
%patch12 -b .iswprint
|
|
|
|
%patch13 -p1
|
2014-08-09 20:32:57 +02:00
|
|
|
%patch14 -p1
|
2015-05-25 02:52:16 +02:00
|
|
|
%patch15 -p1
|
2015-11-16 16:23:08 +01:00
|
|
|
%patch16 -p0
|
2015-05-25 02:52:16 +02:00
|
|
|
%patch0 -b .p0
|
|
|
|
cp -f %{SOURCE3} po/ko.po
|
2015-03-02 13:09:08 +01:00
|
|
|
find -type f | grep -vE '(parseppd|parsessh).y' | xargs \
|
|
|
|
sed -ri 's/59 Temple Place(,| -) Suite 330/51 Franklin Street, Fifth Floor/;s/02111-1307/02110-1301/'
|
2015-03-03 12:58:57 +01:00
|
|
|
touch -r .ref configure.in
|
2015-03-03 12:14:31 +01:00
|
|
|
find -name Makefile.in | xargs touch
|
2007-01-15 23:50:44 +01:00
|
|
|
|
|
|
|
%build
|
2012-05-29 15:43:29 +02:00
|
|
|
#XXX: ugly hack; necessary??
|
2015-03-04 15:25:18 +01:00
|
|
|
#YYY: Not a hack and it is necessary!!
|
|
|
|
# The a2ps source is much to old to (re)run auto conf tools
|
2015-05-25 02:52:16 +02:00
|
|
|
cp -p %{_datadir}/automake-*/config.{guess,sub} auxdir/
|
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -funroll-loops -Wall -pipe -fstack-protector -fPIE"
|
2007-01-15 23:50:44 +01:00
|
|
|
export LPR=lpr
|
|
|
|
export CC=gcc
|
2009-01-19 01:31:59 +01:00
|
|
|
%configure --enable-shared --disable-static --with-pic --with-medium=LC_PAPER \
|
2008-10-27 16:38:28 +01:00
|
|
|
--with-encoding=LC_CTYPE
|
2007-01-15 23:50:44 +01:00
|
|
|
con=""
|
2015-03-03 13:38:39 +01:00
|
|
|
pushd contrib
|
|
|
|
for m4 in *.m4; do
|
|
|
|
in=${m4%.*}.in
|
|
|
|
rm -f ${in} ${m4%.*}
|
2015-03-03 14:13:58 +01:00
|
|
|
con="$con ${in##*/}"
|
2015-03-03 13:38:39 +01:00
|
|
|
done
|
|
|
|
popd
|
2015-03-03 14:13:58 +01:00
|
|
|
make %{?_smp_mflags} -C contrib/ ${con} LDFLAGS="-pie"
|
2007-01-15 23:50:44 +01:00
|
|
|
sh ./config.status
|
2015-03-02 13:09:08 +01:00
|
|
|
make %{?_smp_mflags} PSFONT_PATH=%{_datadir}/ghostscript/fonts LDFLAGS="-pie" MAKEINFO='makeinfo --force'
|
2007-01-15 23:50:44 +01:00
|
|
|
pushd doc
|
2015-03-03 13:38:39 +01:00
|
|
|
texi2html a2ps.texi
|
2007-01-15 23:50:44 +01:00
|
|
|
popd
|
2015-03-04 15:25:18 +01:00
|
|
|
# Run a test with UTF-8 Umlauts
|
|
|
|
mkdir -p .root/.a2ps
|
|
|
|
echo "This is a test text äöüßœéïçèãøæđ" > test.utf8
|
|
|
|
ln -sf $PWD/ps/* .root/.a2ps/
|
|
|
|
ln -sf $PWD/afm/* .root/.a2ps/
|
|
|
|
ln -sf $PWD/encoding/* .root/.a2ps/
|
|
|
|
ln -sf $PWD/ogonkify/* .root/.a2ps/
|
|
|
|
ln -sf $PWD/ppd/* .root/.a2ps/
|
|
|
|
ln -sf $PWD/sheets/* .root/.a2ps/
|
2015-05-25 02:52:16 +02:00
|
|
|
A2PS_CONFIG=$PWD%{_sysconfdir}/a2ps.cfg \
|
2015-03-04 15:25:18 +01:00
|
|
|
HOME=$PWD/.root \
|
|
|
|
LC_CTYPE=en_US.UTF-8 ./src/a2ps --output=test.latin test.utf8
|
|
|
|
grep '(This is a test text' test.latin | iconv -f latin1 -t utf8
|
2007-01-15 23:50:44 +01:00
|
|
|
|
|
|
|
%install
|
2008-10-27 16:38:28 +01:00
|
|
|
make install DESTDIR=%{buildroot} PSFONT_PATH=%{_datadir}/ghostscript/fonts
|
|
|
|
rm -r %{buildroot}/%{_infodir}/regex*
|
|
|
|
rm -r %{buildroot}/%{_infodir}/dir
|
2015-05-25 02:52:16 +02:00
|
|
|
%find_lang %{name}
|
2008-10-27 16:38:28 +01:00
|
|
|
rm -f %{buildroot}%{_libdir}/liba2ps.la
|
2015-05-25 02:52:16 +02:00
|
|
|
install -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/
|
2007-01-15 23:50:44 +01:00
|
|
|
|
|
|
|
%post
|
2009-01-19 01:31:59 +01:00
|
|
|
/sbin/ldconfig
|
2007-01-15 23:50:44 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/ogonkify.info.gz
|
|
|
|
|
2015-03-03 12:58:57 +01:00
|
|
|
%preun
|
2007-01-15 23:50:44 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ogonkify.info.gz
|
|
|
|
|
2015-05-25 02:52:16 +02:00
|
|
|
%postun -p /sbin/ldconfig
|
2015-03-03 14:41:43 +01:00
|
|
|
|
2007-01-15 23:50:44 +01:00
|
|
|
%files -f %{name}.lang
|
2007-02-08 09:00:15 +01:00
|
|
|
%defattr(-,root,root)
|
2015-03-03 14:55:57 +01:00
|
|
|
%doc AUTHORS COPYING ABOUT-NLS ChangeLog NEWS THANKS README doc/a2ps.html
|
2014-08-09 20:32:57 +02:00
|
|
|
%config %{_sysconfdir}/a2ps-site.cfg
|
|
|
|
%config %{_sysconfdir}/a2ps.cfg
|
2008-10-27 16:38:28 +01:00
|
|
|
%{_bindir}/a2ps
|
2010-08-23 15:39:03 +02:00
|
|
|
%{_bindir}/a2ps-open
|
2008-10-27 16:38:28 +01:00
|
|
|
%{_bindir}/card
|
|
|
|
%{_bindir}/composeglyphs
|
|
|
|
%{_bindir}/fixnt
|
|
|
|
%{_bindir}/fixps
|
|
|
|
%{_bindir}/ogonkify
|
|
|
|
%{_bindir}/pdiff
|
|
|
|
%{_bindir}/psmandup
|
|
|
|
%{_bindir}/psset
|
|
|
|
%{_bindir}/texi2dvi4a2ps
|
2015-05-25 02:52:16 +02:00
|
|
|
%{_infodir}/*.gz
|
|
|
|
%{_mandir}/man1/*.1.gz
|
2008-10-27 16:38:28 +01:00
|
|
|
%{_datadir}/a2ps
|
|
|
|
%{_datadir}/emacs/site-lisp/*.el
|
|
|
|
%{_datadir}/emacs/site-lisp/*.elc
|
|
|
|
%{_datadir}/ogonkify
|
2009-01-19 01:31:59 +01:00
|
|
|
%{_libdir}/liba2ps.so.*
|
2008-10-27 16:38:28 +01:00
|
|
|
|
|
|
|
%files -n a2ps-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/liba2ps.h
|
2009-01-19 01:31:59 +01:00
|
|
|
%{_libdir}/liba2ps.so
|
2007-01-15 23:50:44 +01:00
|
|
|
|
2007-02-19 20:47:14 +01:00
|
|
|
%changelog
|