# Template file for 'chroot-texinfo'
pkgname=chroot-texinfo
version=6.5
revision=1
wrksrc="texinfo-${version}"
bootstrap=yes
hostmakedepends="ncurses-devel perl"
makedepends="ncurses-devel"
conflicts="texinfo>=0"
provides="texinfo-${version}_${revision}"
short_desc="The GNU Documentation System -- for xbps-src use"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-3.0-or-later"
homepage="http://www.gnu.org/software/texinfo/"
distfiles="${GNU_SITE}/texinfo/texinfo-${version}.tar.xz"
checksum=77774b3f4a06c20705cc2ef1c804864422e3cf95235e965b1f00a46df7da5f62

do_configure() {
	cp -f ${XBPS_CROSSPFDIR}/config.sub build-aux

	./configure ${configure_args} --disable-nls
}

do_build() {
	if [ -d tools ]; then
		make ${makejobs} -C tools/gnulib/lib
		make ${makejobs} -C tools
	fi
	make ${makejobs}
}

do_install() {
	make DESTDIR=${DESTDIR} install

	rm -f ${DESTDIR}/usr/bin/info
	rm -f ${DESTDIR}/usr/bin/infokey
	rm -rf ${DESTDIR}/usr/share
}
