archrelease: copy trunk to extra-x86_64
[arch-packages.git] / netpbm / trunk / PKGBUILD
blob99bc82c58d49c0531969662a003027d9782a7b41
1 # Maintainer: 
3 pkgname=netpbm
4 pkgver=10.73.41
5 pkgrel=1
6 pkgdesc="A toolkit for manipulation of graphic images"
7 arch=('x86_64')
8 license=('custom' 'BSD' 'GPL' 'LGPL')
9 url="http://netpbm.sourceforge.net/"
10 depends=('perl' 'libpng' 'libtiff' 'libxml2')
11 makedepends=('jbigkit' 'subversion')
12 options=('!makeflags')
13 # Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
14 source=(https://downloads.sourceforge.net/project/netpbm/super_stable/$pkgver/netpbm-$pkgver.tgz
15         https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
16         netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch
17         reproducible-man-gzip.patch use-source-date-epoch.patch)
18 sha256sums=('f572625514b52dde4e2b6e567b8e2738b133e50ee3c5b31d80016117440311fe'
19             '74bcf840ee643c6917330c382484010cb99c004a3fcf05391bebcac63815acb3'
20             'SKIP'
21             '991aba7897e0710687369b4e2edfba1397ecd77d62578eac496afbc47b5ca970'
22             '343a72eb67edb338bc593d823ced770a0fe44c4c1fa4f4ac1934b84da4431579'
23             '2c397588d9cba2c40dee55c07713d5e77e0e04245db939fdc1962d7de4cf4a33'
24             '8e3efdb4fcbfdc8e9a5c8e9663c7d6b9ecef3a2379ce38d2acc5669c339f6814'
25             '68055341833f482c6910a56c2fdfe046978a1a92fd8442a2a9209c82ce3e4d13')
26 validpgpkeys=('5357F3B111688D88C1D88119FCF2CB179205AC90')
28 prepare() {
29   cd $pkgname-$pkgver
31   patch -p1 < ../netpbm-CAN-2005-2471.patch
32   patch -p1 < ../netpbm-security-code.patch
33   patch -p1 < ../netpbm-security-scripts.patch
34   patch -p1 < ../reproducible-man-gzip.patch
35   patch -p1 < ../use-source-date-epoch.patch
36   # sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' buildtools/makeman
37   # sed -i 's|@python|@python2|' buildtools/manpage.mk
39   cp config.mk.in  config.mk
40   [ "${CARCH}" = 'x86_64' ] && echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
41   echo "NETPBM_DOCURL = file://${srcdir}/doc" >> config.mk
42   echo 'TIFFLIB = libtiff.so' >> config.mk
43   echo 'JPEGLIB = libjpeg.so' >> config.mk
44   echo 'PNGLIB = libpng.so' >> config.mk
45   echo 'ZLIB = libz.so' >> config.mk
46   echo 'JBIGLIB = /usr/lib/libjbig.a' >> config.mk
48   sed -i 's|misc|share/netpbm|' common.mk
49   sed -i 's|/link|/lib|' lib/Makefile
50   sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
53 build() {
54   cd $pkgname-$pkgver
55   make
56   # Generating useful man pages with html doc
57   # TODO: Enable when we have it updated
58   # make MAKEMAN="${srcdir}/$pkgname-$pkgver/buildtools/makeman" USERGUIDE="-v ." \
59   #   -C ../doc -f "${srcdir}/$pkgname-$pkgver/buildtools/manpage.mk" manpages
62 package() {
63   cd $pkgname-$pkgver
64   make pkgdir="${pkgdir}/usr" PKGMANDIR=share/man install-run install-dev
66 # Removing dummy man pages
67   rm "${pkgdir}"/usr/share/man/man{1,3,5}/*
69   # make MAKEMAN="${srcdir}/$pkgname-$pkgver/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
70   #   -C ../doc -f "${srcdir}/$pkgname-$pkgver/buildtools/manpage.mk" installman
72 # Replace obsolete utility
73   echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${pkgdir}/usr/bin/pgmtopbm"
75 # Licensing.  Note that each program in the package has a separate license.
76   install -D -m644 "${srcdir}/$pkgname-$pkgver/doc/copyright_summary" \
77     "${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt"