File netpbm.spec of Package netpbm

#
# spec file for package netpbm (Version 10.26.44)
#
# 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:           netpbm
BuildRequires:  flex libjasper-devel libpng-devel libtiff-devel
License:        Any permissive; Artistic License; BSD 3-Clause; GPL v2 or later; Public Domain, Freeware; X11/MIT
Group:          Productivity/Graphics/Convertors
Provides:       pbmplus
AutoReqProv:    on
Version:        10.26.44
Release:        98.<RELEASE17>
Summary:        A Powerful Graphics Conversion Package
Source:         netpbm-%{version}-nohpcdtoppm-nojbig.tar.bz2
Source1:        netpbm-%{version}-documentation.tar.bz2
Source2:        netpbm-%{version}-manpages.tar.bz2
Source3:        prepare-src-tarball
Patch:          netpbm-%{version}.dif
Patch2:         netpbm-%{version}-manpages.patch
Patch4:         netpbm-%{version}-overflow.patch
Patch5:         netpbm-%{version}-aliasing.patch
Patch6:         netpbm-%{version}-tmpfile.patch
Patch7:         netpbm-%{version}-colornames-init.diff
Patch8:         netpbm-%{version}-fixes.patch
Patch9:         netpbm-%{version}-pstopnm-gs-options.patch
Patch10:        netpbm-%{version}-endian.patch
Patch11:        netpbm-%{version}-pnmtopng-CAN-2005-2978.patch
Patch12:        netpbm-%{version}-pnmtopng-overflow.patch
Patch13:        netpbm-%{version}-ximtoppm-fixes.patch
Patch15:        netpbm-%{version}-rgb.patch
Patch16:        netpbm-%{version}-pamtouil.patch
Patch17:        netpbm-%{version}-pnmtopng-transparent.patch
Patch18:        netpbm-%{version}-fix1overflow.patch
Patch19:        netpbm-%{version}-pamscale.patch
Patch20:        netpbm-%{version}-pamperspective.patch
Patch21:        netpbm-%{version}-xpmtoppm-CVE-2009-4274.patch
Url:            http://netpbm.sourceforge.net
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package -n libnetpbm10
License:        LGPL v2.1 or later
Summary:        Libraries for the NetPBM (NetPortableBitmap) Graphic Formats
Group:          System/Libraries
AutoReqProv:    on
Provides:       libnetpbm = %{version}
Obsoletes:      libnetpbm < %{version}

%package -n libnetpbm-devel
License:        LGPL v2.1 or later
Summary:        Libraries for the NetPBM Graphic Formats - files mandatory for development
Group:          Development/Libraries/C and C++
AutoReqProv:    on
Requires:       libnetpbm10 = %{version}
Provides:       libnetpbm:/usr/include/pbm.h

%description
The latest version of the Portable Bitmap Plus Utilities. This large
package, which is by now available for all hardware platforms, provides
tools for graphics conversion. Using these tools, images can be
converted from virtually any format into any other format. A few of the
supported formats include: GIF, PC-Paintbrush, IFF ILBM, Gould Scanner
file, MTV ray tracer, Atari Degas .pi1 and .pi3, Macintosh PICT, HP
Paintjet file, QRT raytracer, AUTOCAD slide, Atari Spectrum (compressed
and uncompressed), Andrew Toolkit raster object, and many more. On top
of that, man pages are included for all tools.



Authors:
--------
    Alberto Accomazzi       <alberto@cfa.harvard.edu>
    Andre Beck              <Andre_Beck@IRS.Inf.TU-Dresden.de>
    Angus Duggan            <ajcd@dcs.ed.ac.uk>
    Arnaud Le Hors          <lehors@sophia.inria.fr>
    Arthur David Olson      <OLSONA@dc37a.nci.nih.gov>
    Burkhard Neidecker-Lutz <neideck@nestvx.enet.dec.com>
    Daniel Briggs           <dbriggs@nrao.edu>
    David Beckemeyer        <bdt!david>
    David Koblas            <koblas@netcom.com>
    Diomidis D. Spinellis   <dds@cc.ic.ac.uk>
    George Phillips         <phillips@cs.ubc.ca>
    Graeme W. Gill          <graeme@labtam.oz.au>
    Hadmut Danisch          <danisch@ira.uka.de>
    Ingo Wilken             <Ingo.Wilken@informatik.uni-oldenburg.de>
    James Darrell McCauley  <mccauley@mcs.com>
    John Tiller             <tiller@galois.msfc.nasa.gov>
    John Walker             <kelvin@Autodesk.com>
    Kanthan Pillay          <svpillay@Princeton.EDU>
    Ken Yap                 <ken@cs.rocester.edu>
    Lyle Rains              <lrains@netcom.com>
    Marcel Wijkstra         <wijkstra@fwi.uva.nl>
    Marc Boucher            <marc@PostImage.COM>
    Oliver Trepte           <oliver.trepte@dd.sigma.se>
    Patrick J. Naughton     <naughton@wind.sun.com>
    Paul Haeberli           <paul@manray.sgi.com>
    Paul Breslaw		<paul@mecazh.uu.ch>
    S.Petra Zeidler         <spz@specklec.mpifr-bonn.mpg.de>
    Steve Belczyk           <seb3@gte.com>
    Warren Toomey           <wkt@csadfa.cs.adfa.oz.au>
    Wilson H. Bent. Jr.     <whb@evtech.com>
    Wolfgang Stuerzlinger   <wrzl@gup.uni-linz.ac.at>

%description -n libnetpbm10
These are the libs for the netpbm graphic formats. The tools can be
found in the netpbm package. The sources are contained in the netpbm
source package.



Authors:
--------
    Rob Hooft <hooft@EMBL-Heidelberg.DE>
    Michael Mauldin <mlm@cs.cmu.edu>

%description -n libnetpbm-devel
These are the libs for the netpbm graphic formats. The tools can be
found in the netpbm package. The sources are contained in the netpbm
source package.



Authors:
--------
    Rob Hooft <hooft@EMBL-Heidelberg.DE>
    Michael Mauldin <mlm@cs.cmu.edu>

%prep
%setup
%setup -D -q -a 1
%setup -D -q -a 2
rm -rf libtiff
%patch
%patch2
%patch4
%patch5
%patch6
%patch7 -p1
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%patch15
%patch16
%patch17
%patch18
%patch19
%patch20
%patch21 -p1
rm -rf converter/other/jpeg2000/libjasper/include #make sure the internal libjasper is not used
mkdir -p pnmtopalm
cd pnmtopalm
cp -v ../converter/other/pnmtopalm/LICENSE .
cp -v ../converter/other/pnmtopalm/README .

%build
cp  Makefile.config.in  Makefile.config
CFLAGS="$RPM_OPT_FLAGS"
%if %suse_version > 1030
CFLAGS="$CFLAGS -flax-vector-conversions"
%endif
make CFLAGS="$CFLAGS" \
     JASPERLIB=-ljasper \
     JASPERHDR_DIR=/usr/include/jasper

%install
mkdir -p $RPM_BUILD_ROOT/usr/{bin,include,%_lib,share/man}
make pkgdir=`pwd`/package package STRIPFLAG=
cp -prd package/bin $RPM_BUILD_ROOT/usr
cp -pd package/{lib,link}/* $RPM_BUILD_ROOT/usr/%_lib
ln -sf libnetpbm.so.10.26 $RPM_BUILD_ROOT/usr/%_lib/libnetpbm.so
ln -sf libnetpbm.so      $RPM_BUILD_ROOT/usr/%_lib/libpbm.so
ln -sf libnetpbm.so      $RPM_BUILD_ROOT/usr/%_lib/libpgm.so
ln -sf libnetpbm.so      $RPM_BUILD_ROOT/usr/%_lib/libpnm.so
ln -sf libnetpbm.so      $RPM_BUILD_ROOT/usr/%_lib/libppm.so
cp -pd package/include/* $RPM_BUILD_ROOT/usr/include
cp -prd man/* $RPM_BUILD_ROOT/usr/share/man
rm $RPM_BUILD_ROOT/usr/%_lib/*.a
mkdir -p $RPM_BUILD_ROOT/usr/share/netpbm
install -m 644 converter/other/pnmtopalm/*.map $RPM_BUILD_ROOT/usr/share/netpbm
rm $RPM_BUILD_ROOT/usr/bin/g3topbm #conflict with g3utils

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libnetpbm10
%run_ldconfig

%postun -n libnetpbm10
%run_ldconfig

%files
%defattr(-,root,root)
%doc   README doc/* netpbm.sourceforge.net/doc
%doc   pnmtopalm/
%doc %{_mandir}/man1/*.gz
%doc %{_mandir}/man3/*.gz
%doc %{_mandir}/man5/*.gz
/usr/bin/*
/usr/share/netpbm

%files -n libnetpbm10
%defattr(-,root,root)
%{_libdir}/lib*.so.*

%files -n libnetpbm-devel
%defattr(-,root,root)
/usr/include/*
%{_libdir}/lib*.so

%changelog
openSUSE Build Service is sponsored by