void-packages/srcpkgs/netpbm/template
2015-09-27 14:47:31 +02:00

69 lines
2.1 KiB
Bash

# Template file for 'netpbm'
pkgname=netpbm
# from http://svn.code.sf.net/p/netpbm/code/advanced/doc/HISTORY
version=10.72.00
revision=1
_githash_guide=d8b2ae2a47c23d0012345503cbdd4377e68357f7
create_wrksrc=yes
build_wrksrc="netpbm-mirror-${version}"
hostmakedepends="pkg-config perl python flex"
makedepends="libjpeg-turbo-devel tiff-devel libpng-devel zlib-devel libxml2-devel libX11-devel"
short_desc="Toolkit for manipulation of graphic images"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="BSD,GPL-2,custom"
homepage="http://netpbm.sourceforge.net/"
nocross=yes
distfiles="https://github.com/chneukirchen/netpbm-mirror/archive/${version}.tar.gz
https://github.com/chneukirchen/netpbm-mirror/archive/${_githash_guide}.tar.gz"
checksum="daa66f9b0ee231c228d98c2a801a7f6d5e43478f699ed6f3c669285f9d2a3296
0ba4401b046971cdf429c0620b7f9b6c6b21f1c7fe31b4e8604e6d5ef611caef"
post_extract() {
cd $build_wrksrc
for p in ${FILESDIR}/*.patch; do
patch -Np1 -i $p
done
}
do_configure() {
cat config.mk.in ${FILESDIR}/config.mk >config.mk
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
echo "WANT_SSE = Y" >>config.mk
fi
sed -i 's|/link|/lib|' lib/Makefile
sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
}
do_build() {
make CC=$CC CFLAGS="$CFLAGS" ${makejobs}
make MAKEMAN="${PWD}/buildtools/makeman" USERGUIDE=. \
-C ../netpbm-mirror-${_githash_guide} \
-f "${PWD}/buildtools/manpage.mk" manpages
}
do_install() {
make pkgdir=$DESTDIR/usr PKGMANDIR=share/man install-run install-dev
rm $DESTDIR/usr/share/man/man?/*
make MAKEMAN="${PWD}/buildtools/makeman" MANDIR="$DESTDIR/usr/share/man" \
-C ../netpbm-mirror-${_githash_guide} \
-f "${PWD}/buildtools/manpage.mk" installman
vlicense doc/copyright_summary LICENSE
}
libnetpbm_package() {
replaces="${sourcepkg}<10.66.03_2"
short_desc+=" - runtime libraries"
pkg_install() {
vmove usr/lib/*.so.*
}
}
libnetpbm-devel_package() {
replaces="${sourcepkg}<10.66.03_2"
depends="libnetpbm>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
}
}