void-packages/srcpkgs/netpbm/template
2016-12-01 16:21:07 +01:00

71 lines
2.3 KiB
Bash

# Template file for 'netpbm'
pkgname=netpbm
# from http://svn.code.sf.net/p/netpbm/code/advanced/doc/HISTORY
version=10.76.01
revision=1
_githash=036f0cf61db2a3521d724d0bc671e719c3be9a38
_githash_guide=0aa9a4d76e4d6e300f9345eb743b0a4bd1120ed9
create_wrksrc=yes
build_wrksrc="netpbm-mirror-${_githash}"
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/${_githash}.tar.gz
https://github.com/chneukirchen/netpbm-mirror/archive/${_githash_guide}.tar.gz"
checksum="f1115bba41e71e3aa1702d8482d102f8f9e036e98bc91904a01a43767e2eb175
4ffae5c1079a1f6cbe0f282c948e7699de2fe56a67744c8df31bebf3ad1d6ae5"
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|misc|share/netpbm|' common.mk
sed -i 's|/link|/lib|' lib/Makefile
sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
}
do_build() {
make ${makejobs} CC=$CC CFLAGS="$CFLAGS" LDFLAGS_FOR_BUILD=
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" USERGUIDE=. \
-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
}
}