void-packages/srcpkgs/w3m/template

45 lines
1.3 KiB
Bash

# Template file for 'w3m'
pkgname=w3m
version=0.5.3.git20180125
revision=1
wrksrc="${pkgname}-${version/.git/-git}"
build_style=gnu-configure
configure_args="
--libexecdir=/usr/lib --enable-image=x11,fb --with-imagelib=imlib2
--with-termlib=ncurses --disable-w3mmailer"
hostmakedepends="pkg-config gc-devel perl"
makedepends="zlib-devel ncurses-devel gc-devel libressl-devel imlib2-devel libX11-devel"
short_desc="Text-based Web browser and pager (with Debian patches)"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
homepage="http://w3m.sourceforge.net"
changelog="https://raw.githubusercontent.com/tats/w3m/master/NEWS"
distfiles="https://github.com/tats/w3m/archive/v${version/.git/+git}.tar.gz"
checksum=c75068ef06963c9e3fd387e8695a203c6edda2f467b5f2f754835afb75eb36f3
LDFLAGS="-lX11"
pre_build() {
# build host mktable
if [ "$CROSS_BUILD" ]; then
make CC=cc CFLAGS=-Os LD=ld LDFLAGS= mktable
mv mktable host-mktable
chmod 755 host-mktable
make clean
sed -e 's,./mktable$(EXT),./host-mktable$(EXT),g' -i Makefile
fi
}
post_install() {
vlicense ${wrksrc}/doc/README
}
w3m-img_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - image display support"
pkg_install() {
vmove /usr/lib/w3m/w3mimgdisplay
vmove /usr/lib/w3m/xface2xpm
}
}