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

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