netpbm/netpbm.spec

194 lines
6.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package netpbm (Version 10.35.69)
#
# Copyright (c) 2009 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 python
License: PERMISSIVE-OSI-COMPLIANT ; Artistic License .. ; BSD3c(or similar) ; GPLv2+ ; Public Domain, Freeware ; MIT License (or similar)
Group: Productivity/Graphics/Convertors
Provides: pbmplus
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: netpbm-64bit
%endif
#
Version: 10.35.69
Release: 1
Summary: A Powerful Graphics Conversion Package
Source: netpbm-%{version}.tar.bz2
Source1: netpbm-%{version}-documentation.tar.bz2
Source3: prepare-src-tarball
Patch: netpbm-%{version}.dif
Patch2: netpbm-%{version}-manpages.patch
Patch3: netpbm-10.23-security.patch
Patch4: netpbm-10.22-security2.patch
Patch6: netpbm-%{version}-tmpfile.patch
Patch7: netpbm-%{version}-colornames-init.diff
Patch8: netpbm-%{version}-fixes.patch
Patch10: netpbm-%{version}-endian.patch
Patch11: netpbm-%{version}-pnmtopng-CAN-2005-2978.patch
Patch13: netpbm-%{version}-ximtoppm-fixes.patch
Patch15: netpbm-%{version}-rgb.patch
Patch16: netpbm-%{version}-pamtouil.patch
Patch17: netpbm-%{version}-pnmtopng-transparent.patch
Patch19: netpbm-%{version}-pamscale.patch
Patch20: netpbm-%{version}-missing-file-close.patch
Url: http://netpbm.sourceforge.net
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package -n libnetpbm10
License: LGPLv2.1+
Summary: Libraries for the NetPBM (NetPortableBitmap) Graphic Formats
Group: System/Libraries
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: libnetpbm-64bit
%endif
#
Provides: libnetpbm = %{version}
Obsoletes: libnetpbm < %{version}
%package -n libnetpbm-devel
License: LGPLv2.1+
Summary: Libraries for the NetPBM Graphic Formats - files mandatory for development
Group: Development/Libraries/C and C++
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: libnetpbm-devel-64bit
%endif
#
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.
%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.
%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
rm -rf libtiff
%patch
%patch2
%patch3 -p1
%patch4 -p1
%patch6
%patch7 -p1
%patch8
%patch10
%patch11
%patch13
%patch15
%patch16
%patch17
%patch19
%patch20
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
# fix build with newer glibc
sed "s:getline:getline_nonlibc:" -i converter/ppm/xvminitoppm.c
#
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
#
# 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
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.35 $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/doc.url
rm $RPM_BUILD_ROOT/usr/bin/g3topbm #conflict with g3utils
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libnetpbm10 -p /sbin/ldconfig
%postun -n libnetpbm10 -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
/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