PKGBUILDs/extra/netpbm/PKGBUILD

84 lines
3.4 KiB
Bash
Raw Normal View History

2014-06-18 02:47:04 +00:00
# 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
2023-03-25 21:30:56 +00:00
pkgver=10.73.43
pkgrel=1
2013-05-07 02:12:27 +00:00
pkgdesc="A toolkit for manipulation of graphic images"
2018-03-23 18:00:52 +00:00
arch=('x86_64')
2013-05-07 02:12:27 +00:00
license=('custom' 'BSD' 'GPL' 'LGPL')
url="http://netpbm.sourceforge.net/"
depends=('perl' 'libpng' 'libtiff' 'libxml2')
2022-08-27 14:36:00 +00:00
makedepends=('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/
2019-07-24 18:18:47 +00:00
source=(https://downloads.sourceforge.net/project/netpbm/super_stable/$pkgver/netpbm-$pkgver.tgz
2016-04-16 14:36:52 +00:00
https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
2020-05-28 19:39:27 +00:00
netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch
2020-05-30 16:47:54 +00:00
reproducible-man-gzip.patch use-source-date-epoch.patch)
2023-03-25 21:30:56 +00:00
sha256sums=('f9fd9a7f932258224d1925bfce61396a15e0fad93e3853d6324ac308d1adebf8'
2019-07-24 18:18:47 +00:00
'74bcf840ee643c6917330c382484010cb99c004a3fcf05391bebcac63815acb3'
'SKIP'
'991aba7897e0710687369b4e2edfba1397ecd77d62578eac496afbc47b5ca970'
2022-11-30 02:13:06 +00:00
'343a72eb67edb338bc593d823ced770a0fe44c4c1fa4f4ac1934b84da4431579'
2020-05-28 19:39:27 +00:00
'2c397588d9cba2c40dee55c07713d5e77e0e04245db939fdc1962d7de4cf4a33'
2020-05-30 16:47:54 +00:00
'8e3efdb4fcbfdc8e9a5c8e9663c7d6b9ecef3a2379ce38d2acc5669c339f6814'
'68055341833f482c6910a56c2fdfe046978a1a92fd8442a2a9209c82ce3e4d13')
2015-01-09 01:17:24 +00:00
validpgpkeys=('5357F3B111688D88C1D88119FCF2CB179205AC90')
2013-05-07 02:12:27 +00:00
prepare() {
2019-07-24 18:18:47 +00:00
cd $pkgname-$pkgver
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
2020-05-28 19:39:27 +00:00
patch -p1 < ../reproducible-man-gzip.patch
2020-05-30 16:47:54 +00:00
patch -p1 < ../use-source-date-epoch.patch
2022-08-27 14:36:00 +00:00
# sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' buildtools/makeman
# sed -i 's|@python|@python2|' buildtools/manpage.mk
2013-05-07 02:12:27 +00:00
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() {
2019-07-24 18:18:47 +00:00
cd $pkgname-$pkgver
2013-05-07 02:12:27 +00:00
make
# Generating useful man pages with html doc
2022-08-27 14:36:00 +00:00
# TODO: Enable when we have it updated
# make MAKEMAN="${srcdir}/$pkgname-$pkgver/buildtools/makeman" USERGUIDE="-v ." \
# -C ../doc -f "${srcdir}/$pkgname-$pkgver/buildtools/manpage.mk" manpages
2013-05-07 02:12:27 +00:00
}
package() {
2019-07-24 18:18:47 +00:00
cd $pkgname-$pkgver
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}/*
2022-08-27 14:36:00 +00:00
# make MAKEMAN="${srcdir}/$pkgname-$pkgver/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
# -C ../doc -f "${srcdir}/$pkgname-$pkgver/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.
2019-07-24 18:18:47 +00:00
install -D -m644 "${srcdir}/$pkgname-$pkgver/doc/copyright_summary" \
2013-05-07 02:12:27 +00:00
"${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt"
}