# Description: A toolkit for manipulation of graphic images. # URL: http://netpbm.sourceforge.net/ # Maintainer: Erich Eckner, crux at eckner dot net # Depends on: perl libpng libtiff libxml2 python jbigkit name=netpbm version=10.73.32 release=2 source=(https://downloads.sourceforge.net/project/netpbm/super_stable/$version/netpbm-$version.tgz https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig} netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch reproducible-man-gzip.patch use-source-date-epoch.patch) build() { cd $name-$version patch -p1 < ../netpbm-CAN-2005-2471.patch patch -p1 < ../netpbm-security-code.patch patch -p1 < ../netpbm-security-scripts.patch patch -p1 < ../reproducible-man-gzip.patch patch -p1 < ../use-source-date-epoch.patch cp config.mk.in config.mk echo 'CFLAGS_SHLIB = -fPIC' >> config.mk echo "NETPBM_DOCURL = file://${SRC}/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 make # Generating useful man pages with html doc make MAKEMAN="${SRC}/$name-$version/buildtools/makeman" USERGUIDE=. \ -C ../doc -f "${SRC}/$name-$version/buildtools/manpage.mk" manpages make pkgdir="${PKG}/usr" PKGMANDIR=share/man install-run install-dev # Removing dummy man pages rm "${PKG}"/usr/share/man/man{1,3,5}/* make MAKEMAN="${SRC}/$name-$version/buildtools/makeman" MANDIR="${PKG}/usr/share/man" \ -C ../doc -f "${SRC}/$name-$version/buildtools/manpage.mk" installman # Replace obsolete utility echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${PKG}/usr/bin/pgmtopbm" # Licensing. Note that each program in the package has a separate license. install -D -m644 "${SRC}/$name-$version/doc/copyright_summary" \ "${PKG}/usr/share/licenses/${name}/copyright_summary.txt" }