# Template file for 'alpine'
pkgname=alpine
version=2.21.99999
revision=2
_githash=abeb2c25935ef8c75f1e5deef0f81276754dc975
_gitshort="${_githash:0:7}"
wrksrc="${pkgname}-${_gitshort}"
build_style=gnu-configure
configure_args="--without-passfile --without-tcl --disable-shared
 --with-ssl-dir=${XBPS_CROSS_BASE}/usr alpine_SSLPROVIDER=libressl
 --with-system-pinerc=/etc/${pkgname}.d/pine.conf
 --with-system-fixed-pinerc=/etc/${pkgname}.d/pine.conf.fixed"
hostmakedepends="hunspell"
makedepends="pam-devel ncurses-devel gettext-devel libldap-devel mit-krb5-devel"
short_desc="Apache-licensed PINE mail user agent (with Chappa patches)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="http://repo.or.cz/alpine.git"
distfiles="http://repo.or.cz/alpine.git/snapshot/${_githash}.tar.gz"
checksum=983f04e1c5f1beba767877303c682d3c995e0cd93ad6888f2d9933ef4236c25f

post_extract() {
	sed -i -e '/run test program/s/^/: /' \
		-e 's/linux-gnu/linux-/g' ${wrksrc}/configure
}

do_build() {
	make -C pith help_c_gen help_h_gen \
		CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS= LDFLAGS="$BUILD_LDFLAGS"
	make ${makejobs} all CC="$CC"
}

post_install() {
	vlicense NOTICE
}
