2014-06-18 02:47:04 +00:00
|
|
|
# $Id$
|
|
|
|
# Maintainer:
|
2013-05-07 02:12:27 +00:00
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2015-07-12 14:58:38 +00:00
|
|
|
# - add armv7h and aarch64 for -fPIC flag
|
2013-05-07 02:12:27 +00:00
|
|
|
|
|
|
|
pkgname=netpbm
|
2015-01-09 01:17:24 +00:00
|
|
|
pkgver=10.69.02
|
2014-06-18 02:47:04 +00:00
|
|
|
pkgrel=1
|
2013-05-07 02:12:27 +00:00
|
|
|
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')
|
2015-01-09 01:17:24 +00:00
|
|
|
makedepends=('python2' 'jbigkit' 'subversion')
|
2013-05-07 02:12:27 +00:00
|
|
|
options=('!makeflags')
|
2014-07-09 02:40:20 +00:00
|
|
|
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
|
|
|
|
source=(svn://svn.code.sf.net/p/netpbm/code/advanced
|
|
|
|
ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
|
2013-05-07 02:12:27 +00:00
|
|
|
netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
|
2014-07-09 02:40:20 +00:00
|
|
|
sha1sums=('SKIP'
|
2014-06-18 02:47:04 +00:00
|
|
|
'25a58975bd8cd383238b4ae31f4405c60914faac'
|
|
|
|
'SKIP'
|
2013-05-07 02:12:27 +00:00
|
|
|
'b79cf9d42488fea065ba16262ed97694c47af08d'
|
2015-01-09 01:17:24 +00:00
|
|
|
'313e040ea74eb73675aa420b6f54e1f4452c4769'
|
2014-06-18 02:47:04 +00:00
|
|
|
'c67a63c010353de3ecac3ad72ba76bbb85e4ed4c')
|
2015-01-09 01:17:24 +00:00
|
|
|
validpgpkeys=('5357F3B111688D88C1D88119FCF2CB179205AC90')
|
2013-05-07 02:12:27 +00:00
|
|
|
|
2014-07-09 02:40:20 +00:00
|
|
|
pkgver() {
|
|
|
|
cd advanced
|
|
|
|
echo $(grep MAJOR version.mk |cut -d ' ' -f 3).$(grep MINOR version.mk |cut -d ' ' -f 3).0$(grep POINT version.mk |cut -d ' ' -f 3)
|
2013-05-07 02:12:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2013-10-26 22:04:48 +00:00
|
|
|
cd advanced
|
2013-05-07 02:12:27 +00:00
|
|
|
|
|
|
|
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
|
2015-07-12 14:58:38 +00:00
|
|
|
[ "${CARCH}" = 'aarch64' ] && echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
|
2013-05-07 02:12:27 +00:00
|
|
|
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
|
2014-07-09 02:40:20 +00:00
|
|
|
echo 'JBIGLIB = /usr/lib/libjbig.a' >> config.mk
|
2013-05-07 02:12:27 +00:00
|
|
|
|
|
|
|
sed -i 's|misc|share/netpbm|' common.mk
|
|
|
|
sed -i 's|/link|/lib|' lib/Makefile
|
2014-06-18 02:47:04 +00:00
|
|
|
sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
|
2013-05-07 02:12:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2013-10-26 22:04:48 +00:00
|
|
|
cd advanced
|
2013-05-07 02:12:27 +00:00
|
|
|
make
|
|
|
|
# Generating useful man pages with html doc
|
|
|
|
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \
|
2013-10-26 22:04:48 +00:00
|
|
|
-C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" manpages
|
2013-05-07 02:12:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2013-10-26 22:04:48 +00:00
|
|
|
cd advanced
|
2013-05-07 02:12:27 +00:00
|
|
|
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" \
|
2013-10-26 22:04:48 +00:00
|
|
|
-C ../doc -f "${srcdir}/advanced/buildtools/manpage.mk" installman
|
2013-05-07 02:12:27 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
}
|