blob: 2bb647009a46d0c895c9d967f2f0d7f7cdc97b22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $Id: PKGBUILD 148858 2012-02-05 11:53:06Z ibiru $
# Maintainer: Kevin Piche <kevin@archlinux.org>
pkgname=netpbm
pkgver=10.57.1
pkgrel=1.1
pkgdesc="A toolkit for manipulation of graphic images"
arch=('i686' 'x86_64' 'mips64el')
license=('custom' 'BSD' 'GPL' 'LGPL')
url="http://netpbm.sourceforge.net/"
depends=('perl' 'libpng' 'libtiff' 'libxml2')
makedepends=('python2')
options=('!makeflags')
# Releases after 10.34 are available via SVN only.
# Get Advanced tarball here: http://netpbm.sourceforge.net/release.html#tarball
# Get version number from version.mk
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
source=(ftp://ftp.archlinux.org/other/netpbm/${pkgname}-${pkgver}.tar.gz \
ftp://ftp.archlinux.org/other/netpbm/netpbm-doc-22Feb2009.tar.xz \
netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
sha1sums=('cd0b99333faf994a680d77c5d217034df35ebd4e'
'dfeba9f9a5fe987d64db0aadb5ca8c1b20fcead2'
'b79cf9d42488fea065ba16262ed97694c47af08d'
'4cd5b94a24886ecae3973c5ae104d8298fe5a1f5'
'2ac31f714121e08e47af9337c6bbaab3cbfc5c75')
build() {
cd "${srcdir}/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}" != 'i686' ] && 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.manweb install.man|install.man|' GNUmakefile
make
# Generating useful man pages with html doc
cd "${srcdir}/doc"
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \
-f "${srcdir}/advanced/buildtools/manpage.mk" manpages
}
package() {
cd "${srcdir}/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}/*
cd "${srcdir}/doc"
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
-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"
}
|