netpbm/netpbm.spec

153 lines
5.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package netpbm
#
# Copyright (c) 2018 SUSE LINUX 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/
#
%define libmaj 11
%define libmin 82
%define libver %{libmaj}.%{libmin}
Name: netpbm
Version: 10.82.2
Release: 0
Summary: A Powerful Graphics Conversion Package
License: BSD-3-Clause AND GPL-2.0-or-later AND IJG AND MIT AND SUSE-Public-Domain
Group: Productivity/Graphics/Convertors
Url: 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
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
Patch0: %{name}-make.patch
Patch3: %{name}-tmpfile.patch
Patch4: %{name}-security-code.patch
Patch5: %{name}-security-scripts.patch
Patch6: %{name}-gcc-warnings.patch
Patch7: makeman-py3.patch
Patch8: netpbm-CVE-2018-8975.patch
BuildRequires: flex
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
BuildRequires: pkgconfig
# needed for the makeman
BuildRequires: python3-base
BuildRequires: pkgconfig(x11)
Provides: pbmplus
%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.
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%package -n libnetpbm%{libmaj}
Summary: Libraries for the NetPBM (NetPortableBitmap) Graphic Formats
Group: System/Libraries
Provides: libnetpbm = %{version}
Obsoletes: libnetpbm < %{version}
%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.
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%package -n libnetpbm-devel
Summary: Libraries for the NetPBM Graphic Formats - files mandatory for development
Group: Development/Libraries/C and C++
Requires: libnetpbm%{libmaj} = %{version}
%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
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%setup -q -D -a 1
%patch0
%patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -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
sed -i "s:STATICLIB_TOO = y:STATICLIB_TOO = n:" config.mk
# following two added 10.66.0, reported upstream
# recipe for target 'converter/install.manweb' failed
echo 'install.manweb:' >> converter/ppm/hpcdtoppm/Makefile
# dtto for ppmtompeg
echo 'install.manweb:' >> converter/ppm/ppmtompeg/Makefile
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
export CFLAGS="%{optflags} -flax-vector-conversions"
make %{?_smp_mflags} 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/g3topbm #conflict with g3utils
#
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
mkdir -p %{buildroot}%{_prefix}/{bin,include,%{_lib},share/man,share/%{name}}
cp -pd package/bin/* %{buildroot}%{_bindir}
cp -pd package/lib/*.so* %{buildroot}%{_libdir}
ln -s libnetpbm.so.%{libver} %{buildroot}%{_libdir}/libnetpbm.so
cp -prd package/include/netpbm %{buildroot}%{_includedir}
cp -prd man/* %{buildroot}%{_mandir}
install -m 644 converter/other/pnmtopalm/*.map \
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%{buildroot}%{_datadir}/%{name}
%post -n libnetpbm%{libmaj} -p /sbin/ldconfig
%postun -n libnetpbm%{libmaj} -p /sbin/ldconfig
%files
%doc README doc/* netpbm.sourceforge.net/doc
%doc pnmtopalm/
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%{_mandir}/man1/*%{ext_man}
%{_mandir}/man5/*%{ext_man}
%{_bindir}/*
%{_datadir}/%{name}
%files -n libnetpbm%{libmaj}
%{_libdir}/lib*.so.%{libmaj}
%{_libdir}/lib*.so.%{libver}
%files -n libnetpbm-devel
%{_includedir}/%{name}
%{_libdir}/lib*.so
%{_mandir}/man3/*%{ext_man}
%changelog