# # spec file for package netpbm (Version 10.35.74) # # 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 # regarding to libpng: netpbm is compatible with libpng14 from version 10.48 BuildRequires: flex libjasper-devel libpng-devel libtiff-devel python License: LGPLv2.1+ Group: Productivity/Graphics/Convertors Provides: pbmplus AutoReqProv: on # bug437293 %ifarch ppc64 Obsoletes: netpbm-64bit %endif # Version: 10.35.77 Release: 2 Summary: A Powerful Graphics Conversion Package Source: netpbm-%{version}.tar.bz2 Source1: netpbm-%{version}-documentation.tar.bz2 Source2: baselibs.conf Source3: prepare-src-tarball # SUSE specific Patch0: %{name}-%{version}-make.patch # partially upstreamed in development version Patch1: %{name}-%{version}-manpages.patch # refused by upstream Patch2: %{name}-%{version}-security.patch # refused by upstream Patch3: %{name}-%{version}-security2.patch # refused by upstream Patch4: %{name}-%{version}-pnmtopng-CAN-2978.patch # don't know what it does so far Patch5: %{name}-%{version}-tmpfile.patch # upstreamed in development version Patch6: %{name}-%{version}-fixes.patch # upstreamed in development version (another way) Patch7: %{name}-%{version}-pamscale.patch # upstreamed in development version Patch8: %{name}-%{version}-missing-file-close.patch # no build date Patch9: netpbm-no-build-date.patch # new versions build against libpng14 Patch10: %{name}-%{version}-libpng14.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 %patch0 %patch1 %patch2 -p1 %patch3 -p1 %patch4 %patch5 %patch6 %patch7 %patch8 %patch9 %patch10 -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 # 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