# $Id$ # Maintainer: # ALARM: Kevin Mihelich # - add armv7h for -fPIC flag pkgname=netpbm pkgver=10.66.03 pkgrel=1 pkgdesc="A toolkit for manipulation of graphic images" arch=('i686' 'x86_64') license=('custom' 'BSD' 'GPL' 'LGPL') url="http://netpbm.sourceforge.net/" depends=('perl' 'libpng' 'libtiff' 'libxml2') makedepends=('python2') options=('!makeflags') source=(ftp://ftp.archlinux.org/other/packages/netpbm/${pkgname}-${pkgver}.tar.xz{,.sig} \ ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig} \ netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch) sha1sums=('b396dfde402b6979a8b551cf60ba1030278a233d' 'SKIP' '25a58975bd8cd383238b4ae31f4405c60914faac' 'SKIP' 'b79cf9d42488fea065ba16262ed97694c47af08d' '4213468c44a63c0575896f6781987a09cfcc2d30' 'c67a63c010353de3ecac3ad72ba76bbb85e4ed4c') # source PKGBUILD && mksource mksource() { # Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/ svn checkout svn://svn.code.sf.net/p/netpbm/code/advanced advanced _pkgver=$(grep MAJOR advanced/version.mk |cut -d ' ' -f 3).$(grep MINOR advanced/version.mk |cut -d ' ' -f 3).0$(grep POINT advanced/version.mk |cut -d ' ' -f 3) tar -cf ${pkgname}-${_pkgver}.tar.xz advanced gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${_pkgver}.tar.xz rm -r advanced } prepare() { cd advanced patch -p1 < ../netpbm-CAN-2005-2471.patch patch -p1 < ../netpbm-security-code.patch patch -p1 < ../netpbm-security-scripts.patch sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' buildtools/makeman sed -i 's|@python|@python2|' buildtools/manpage.mk cp config.mk.in config.mk [ "${CARCH}" = 'x86_64' ] && echo 'CFLAGS_SHLIB = -fPIC' >> config.mk [ "${CARCH}" = 'armv7h' ] && echo 'CFLAGS_SHLIB = -fPIC' >> config.mk echo "NETPBM_DOCURL = file://${srcdir}/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 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() { cd advanced make # Generating useful man pages with html doc make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \ -C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" manpages } package() { cd advanced make pkgdir="${pkgdir}/usr" PKGMANDIR=share/man install-run install-dev # Removing dummy man pages rm "${pkgdir}"/usr/share/man/man{1,3,5}/* make MAKEMAN="${srcdir}/advanced/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \ -C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" installman # Replace obsolete utility echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${pkgdir}/usr/bin/pgmtopbm" # Licensing. Note that each program in the package has a separate license. install -D -m644 "${srcdir}/advanced/doc/copyright_summary" \ "${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt" }