SHA256
1
0
forked from pool/netpbm
netpbm/netpbm.spec
Petr Gajdos d69d1da134 - updated to 10.60.03:
* Xbmtopbm: fix incorrect output, memory leak.  Thanks Prophet of
              the Way <afu@wta.att.ne.jp>.
  * Pamtojpeg2k: default to no compression ratio constraint and
              allow compression ratios less than 1.  Because of compression
              metadata, small images do require loss of quality in order to
              get down to a compression ratio of 1.
  * Sunicontopnm: Fix incorrect output for depth 8.  Always broken
              (depth = 8 capability was added in Netpbm 10.53 (December 2010).
              pamgauss: Fix bug: erroneously says -maxval is too big on 64 bit
              system.  Always broken (Pamgauss was added in 10.23 (July 2004).
  * xpmtoppm: major speedup for 3-character-per pixel files,
              memory reduction for all files: use hash table instead of
              linear search or direct index, go row by row.
  * xpmtoppm: fix bogus "color number too large" failure.  Broken
              in 10.49 (December 2009).
  * pnm_hashtuple: slight performance improvement from new hash
              function.  Thanks Prophet of the Way <afu@wta.att.ne.jp>.
  * ppmtospu: wild memory accesses.  Always broken (program added in
              10.58 (March 2012).
  * pamtosrf: fix storage corruption.  Always broken (program added
              in 10.55 (June 2011).

OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=42
2012-11-21 08:28:10 +00:00

167 lines
5.3 KiB
RPMSpec

#
# spec file for package netpbm
#
# Copyright (c) 2012 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/
#
Name: netpbm
BuildRequires: flex
BuildRequires: libjasper-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: python
Provides: pbmplus
# bug437293
%ifarch ppc64
Obsoletes: netpbm-64bit
%endif
#
%define libmaj 11
%define libmin 59
%define libver %{libmaj}.%{libmin}
Version: 10.60.3
Release: 0
Summary: A Powerful Graphics Conversion Package
License: BSD-3-Clause and GPL-2.0+ and SUSE-IJG and MIT and SUSE-Public-Domain
Group: Productivity/Graphics/Convertors
Url: http://http://netpbm.sourceforge.net/
Source: netpbm-%{version}-nohpcdtoppm-noppmtompeg.tar.bz2
Source1: netpbm-%{version}-documentation.tar.bz2
Source2: baselibs.conf
Source3: prepare-src-tarball
# SUSE specific
Patch0: %{name}-make.patch
# SUSE specific: no build date
Patch1: %{name}-no-build-date.patch
# upstreamed in development version
Patch2: %{name}-missing-file-close.patch
Patch3: %{name}-tmpfile.patch
Patch4: %{name}-security-code.patch
Patch5: %{name}-security-scripts.patch
%package -n libnetpbm%{libmaj}
Summary: Libraries for the NetPBM (NetPortableBitmap) Graphic Formats
Group: System/Libraries
# bug437293
%ifarch ppc64
Obsoletes: libnetpbm-64bit
%endif
#
Provides: libnetpbm = %{version}
Obsoletes: libnetpbm < %{version}
%package -n libnetpbm-devel
Summary: Libraries for the NetPBM Graphic Formats - files mandatory for development
Group: Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes: libnetpbm-devel-64bit
%endif
#
Requires: libnetpbm%{libmaj} = %{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.
%description -n libnetpbm%{libmaj}
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.
%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.
%prep
%setup
%setup -D -q -a 1
%patch0
%patch1
%patch2
%patch3
%patch4 -p1
%patch5 -p1
mkdir pnmtopalm # for %doc pnmtopalm
cp -p converter/other/pnmtopalm/{LICENSE,README} pnmtopalm
%build
# netpbm has _interactive_ configure perl script
cp config.mk.in config.mk # recomended by upstream, see doc/INSTALL
export CFLAGS="$RPM_OPT_FLAGS -flax-vector-conversions"
make CFLAGS="$CFLAGS"
rm doc/INSTALL
#
# convert html to man pages
cd netpbm.sourceforge.net/doc
../../buildtools/makeman *.html
for i in 1 3 5 ; do
mkdir -p ../../man/man${i}
mv *.${i} ../../man/man${i}
done
%install
# netpbm has _interactive_ install perl script, see doc/INSTALL
make pkgdir=`pwd`/package package STRIPFLAG=
rm package/bin/doc.url
rm package/bin/g3topbm #conflict with g3utils
#
mkdir -p $RPM_BUILD_ROOT%{_prefix}/{bin,include,%_lib,share/man,share/%{name}}
cp -pd package/bin/* $RPM_BUILD_ROOT%{_bindir}
cp -pd package/lib/*.so* $RPM_BUILD_ROOT%{_libdir}
ln -s libnetpbm.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libnetpbm.so
ln -s libnetpbm.so $RPM_BUILD_ROOT%{_libdir}/libpbm.so
ln -s libnetpbm.so $RPM_BUILD_ROOT%{_libdir}/libpgm.so
ln -s libnetpbm.so $RPM_BUILD_ROOT%{_libdir}/libpnm.so
ln -s libnetpbm.so $RPM_BUILD_ROOT%{_libdir}/libppm.so
cp -prd package/include/netpbm $RPM_BUILD_ROOT%{_includedir}
cp -prd man/* $RPM_BUILD_ROOT%{_mandir}
install -m 644 converter/other/pnmtopalm/*.map \
$RPM_BUILD_ROOT%{_datadir}/%{name}
%post -n libnetpbm%{libmaj} -p /sbin/ldconfig
%postun -n libnetpbm%{libmaj} -p /sbin/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
%{_bindir}/*
%{_datadir}/%{name}
%files -n libnetpbm%{libmaj}
%defattr(-,root,root)
%{_libdir}/lib*.so.*
%files -n libnetpbm-devel
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/lib*.so
%changelog