LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File enscript.spec of Package enscript (Project openSUSE:11.4)

# spec file for package enscript (Version 1.6.4)
# Copyright (c) 2010 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
License:        GPLv2+
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:        159
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
Patch5:         enscript-1.6.4-perl_parens.patch
Patch6:         enscript-1.6.4-sh_string.patch
Patch7:         enscript-1.6.4-fdleak.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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. ~ ~

    Markku Rossi <mtr@iki.fi>

%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 -P 5 -p 0 -b .perl
%patch -P 6 -p 0 -b .shell
%patch -P 7 -p 0 -b .fdleak

  CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -funroll-loops -Wall -fno-strict-aliasing -pipe -fstack-protector"
  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 \
  pushd lib/
    make -f Makefile-encodings
  pushd afmlib/
    make -f Makefile-encodings

  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}

%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%files -f %{name}.lang
%doc docs/ChangeLog docs/FAQ.html
%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
%dir /usr/share/ghostscript
%dir /usr/share/ghostscript/fonts
%doc %{_infodir}/%{name}.info.gz