mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 18:47:15 +08:00
71 lines
2.5 KiB
Bash
71 lines
2.5 KiB
Bash
# Platform Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer abveritas@chakra-project.org
|
|
|
|
pkgname=netpbm
|
|
pkgver=10.57.1
|
|
pkgrel=1
|
|
pkgdesc="A toolkit for manipulation of graphic images"
|
|
arch=('x86_64')
|
|
license=('custom' 'BSD' 'GPL' 'LGPL')
|
|
url="http://netpbm.sourceforge.net/"
|
|
depends=('perl' 'libjpeg-turbo' 'libpng' 'libtiff' 'libxml2')
|
|
makedepends=('python2')
|
|
options=('!makeflags')
|
|
|
|
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}" = 'x86_64' ] && 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"
|
|
}
|