netpbm/netpbm.spec

266 lines
9.1 KiB
RPMSpec
Raw Normal View History

Name: netpbm
Version: 10.73.34
Release: 1mamba
Summary: Tools for manipulating graphics files in netpbm supported formats
Group: Applications/Multimedia
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://netpbm.sourceforge.net
Source0: https://downloads.sourceforge.net/project/netpbm/super_stable/%{version}/netpbm-%{version}.tgz
#Source: http://www12.frugalware.org/mirrors/ftp.frugalware.org/pub/other/sources/netpbm/netpbm-%{version}.tar.bz2
#Source: http://archlinux.c3sl.ufpr.br/other/packages/netpbm/netpbm-%{version}.tar.xz
Source1: https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz
Source2: %{name}-10.51.00-config.mk
Patch0: %{name}-10.15-make.patch
Patch1: %{name}-10.30-manpath.patch
Patch2: %{name}-10.22-security_mktemp.patch
Patch3: %{name}-10.23-security-rh.patch
Patch4: %{name}-10.27-bmptopnm.patch
Patch5: %{name}-10.73.33-CAN-2005-2471.patch
Patch6: %{name}-10.28-gcc4.patch
Patch7: %{name}-10.20-CAN-2005-2978.patch
Patch8: %{name}-10.30-pamtofits.patch
Patch9: netpbm-10.73.33-security-code.patch
Patch10: netpbm-10.73.33-security-scripts.patch
Patch11: netpbm-10.73.33-reproducible-man-gzip.patch
License: Freeware
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
%if "%{stage1}" != "1"
BuildRequires: libX11-devel
%endif
BuildRequires: libxml2-devel
BuildRequires: libz-devel
BuildRequires: perl-devel
## AUTOBUILDREQ-END
Requires: libnetpbm = %{?epoch:%epoch:}%{version}-%{release}
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Netpbm is a toolkit for manipulation of graphic images, including conversion of images between a variety of different formats.
There are over 220 separate tools in the package including converters for about 100 graphics formats.
Examples of the sort of image manipulation we're talking about are:
* Shrinking an image by 10%
* Cutting the top half off of an image
* Making a mirror image
* Creating a sequence of images that fade from one image to another
The goal of Netpbm is to be a single source for all the primitive graphics utilities, especially converters, one might need.
So if you know of some freely redistributable software in this vein which is not in the package yet, you should bring it to the attention of the Netpbm maintainer so it can be included in the next release.
Netpbm does not contain interactive tools and doesn't have a graphical interface.
%package -n libnetpbm
Group: System/Libraries
Summary: A library for manipulating graphics files in netpbm supported formats
%description -n libnetpbm
Netpbm is a toolkit for manipulation of graphic images, including conversion of images between a variety of different formats.
There are over 220 separate tools in the package including converters for about 100 graphics formats.
Examples of the sort of image manipulation we're talking about are:
* Shrinking an image by 10%
* Cutting the top half off of an image
* Making a mirror image
* Creating a sequence of images that fade from one image to another
%package -n libnetpbm-devel
Group: Development/Libraries
Summary: Tools for manipulating graphics files in netpbm supported formats
Requires: libnetpbm = %{?epoch:%epoch:}%{version}-%{release}
Provides: netpbm-devel
Obsoletes: netpbm-devel
%description -n libnetpbm-devel
Netpbm is a toolkit for manipulation of graphic images, including conversion of images between a variety of different formats.
There are over 220 separate tools in the package including converters for about 100 graphics formats.
Examples of the sort of image manipulation we're talking about are:
* Shrinking an image by 10%
* Cutting the top half off of an image
* Making a mirror image
* Creating a sequence of images that fade from one image to another
This package contains static libraries and header files need for development.
#% debug_package
%prep
%setup -q -a1
%patch5 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
cp config.mk.in config.mk
#install -m0644 %{SOURCE2} ./config.mk
#sed -i "s|CC =.*|CC = %{_host}-gcc|" config.mk
#%if "%{stage1}" == "1"
#sed -i "s|X11LIB =.*|X11LIB = NONE|" config.mk
#%endif
#%ifarch x86_64 aarch64
echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
#%endif
echo "NETPBM_DOCURL = file://${PWD}/doc" >> config.mk
echo 'TIFFLIB = libtiff.so' >> config.mk
echo 'JPEGLIB = libjpeg.so' >> config.mk
echo 'PNGLIB = libpng.so' >> config.mk
echo 'ZLIB = libz.so' >> config.mk
echo 'JBIGLIB = /usr/lib/libjbig.a' >> config.mk
sed -i 's|misc|share/netpbm|' common.mk
sed -i 's|/link|/lib|' lib/Makefile
sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
%build
#%if "%{_host}" != "%{_build}"
#make -C buildtools CC=%{_build}-gcc
#sed -i "s|libpng-config|-lpng14|" converter/other/Makefile
#%endif
%make
#\
# CFLAGS="%{optflags} -fPIC" -j1 \
# CC=%{_host}-gcc \
# LINUXSVGALIB=NONE \
#%if "%{stage1}" != "1"
# X11LIB=%{_libdir}/libX11.so \
#%else
# X11LIB=NONE \
#%endif
# NETPBM_DOCURL=%{_datadir}/doc/%{name}-%{version}/netpbm.sourceforge.net/doc
# Generating useful man pages with html doc
make MAKEMAN="${PWD}/buildtools/makeman" USERGUIDE=. \
-C doc -f "${PWD}/buildtools/manpage.mk" manpages
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
make pkgdir=%{buildroot}%{_prefix} PKGMANDIR=share/man install-run install-dev
# Removing dummy man pages
rm %{buildroot}%{_mandir}/man{1,3,5}/*
make MAKEMAN=${PWD}/buildtools/makeman MANDIR=%{buildroot}%{_mandir} \
-C doc -f ${PWD}/buildtools/manpage.mk installman
%ifarch x86_64 aarch64
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir}
rm -f %{buildroot}%{_libdir}/libnetpbm.so
ln -s libnetpbm.so.11 %{buildroot}%{_libdir}/libnetpbm.so
%endif
# Replace obsolete utility
echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > %{buildroot}%{_bindir}/pgmtopbm
:<< __OBSOLETE
make package \
pkgdir=%{buildroot}%{_prefix} \
STRIPFLAG="" \
LINUXSVGALIB=NONE \
PKGMANDIR=/share/man \
%if "%{stage1}" != "1"
X11LIB=%{_libdir}/libX11.so \
%else
X11LIB=NONE \
%endif
NETPBM_DOCURL=%{_datadir}/doc/%{name}-%{version}/netpbm.sourceforge.net/doc
mv %{buildroot}%{_prefix}/link/libnetpbm.a %{buildroot}%{_libdir}
mv %{buildroot}%{_prefix}/misc/*.map %{buildroot}%{_libdir}
#ln -sf libnetpbm.so.10 %{buildroot}%{_libdir}/libnetpbm.so
# remove unpackaged files
rm -fr %{buildroot}%{_prefix}/misc/
rm %{buildroot}%{_prefix}/README
rm %{buildroot}%{_prefix}/VERSION
rm %{buildroot}%{_prefix}/pkginfo
rm %{buildroot}%{_prefix}/man/web/netpbm.url
rm %{buildroot}%{_prefix}/link/libnetpbm.so
rm %{buildroot}%{_prefix}/config_template
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n libnetpbm -p /sbin/ldconfig
%postun -n libnetpbm -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/*
%dir %{_datadir}/netpbm
%{_datadir}/netpbm/*
%{_mandir}/man[15]/*
%files -n libnetpbm
%defattr(-,root,root,-)
%{_libdir}/libnetpbm.so.*
%doc doc/COPYRIGHT.PATENT
%files -n libnetpbm-devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libnetpbm.a
%{_libdir}/libnetpbm.so
%{_mandir}/man3/*
%doc README doc/{HISTORY,USERDOC}
#%doc netpbm.sourceforge.net
%changelog
* Thu Feb 11 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 10.73.34-1mamba
- update to 10.73.34
* Sun Nov 29 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 10.73.33-1mamba
- update to 10.73.33
* Fri Jul 26 2013 Automatic Build System <autodist@mambasoft.it> 10.61.02-1mamba
- update to 10.61.02
* Thu Jul 18 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 10.60.00-2mamba
- fix broken libnetpbm.so symlink
* Wed Dec 26 2012 Automatic Build System <autodist@mambasoft.it> 10.60.00-1mamba
- automatic version update by autodist
* Fri Aug 10 2012 Automatic Build System <autodist@mambasoft.it> 10.58.00-1mamba
- automatic version update by autodist
* Tue Apr 17 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 10.57.00-1mamba
- update to 10.57.00
* Wed Aug 18 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 10.51.00-1mamba
- update to 10.51.00
* Fri May 14 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 10.35.74-2mamba
- added libnetpbm and libnetpbm subpackages
* Thu May 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 10.35.74-1mamba
- update to 10.35.74
* Wed Dec 10 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 10.33-1mamba
- automatic update by autodist
* Wed Jun 13 2007 Aleph0 <aleph0@openmamba.org> 10.30-3mamba
- fix permissions of some documentation folders
* Mon Jun 26 2006 Davide Madrisan <davide.madrisan@qilinux.it> 10.30-2qilnx
- security update (qibug#190)
* Wed Oct 26 2005 Davide Madrisan <davide.madrisan@qilinux.it> 10.30-1qilnx
- update to version 10.30 by autospec
- security fix QSA-2005-127 (CAN-2005-2978)
* Fri Aug 12 2005 Davide Madrisan <davide.madrisan@qilinux.it> 10.20-2qilnx
- fixed several security issues: QSA-2005-089 (p2, p3, CAN-2005-2471)
* Wed Feb 25 2004 Davide Madrisan <davide.madrisan@qilinux.it> 10.20-1qilnx
- first build