#!/usr/bin/env modbuild

SOURCE_URL="http://www.kernel.org/pub/software/scm/$P/$P-$V.tar.gz"

case ${OS} in
Darwin )
	export NO_APPLE_COMMON_CRYPTO=1
	# we use 'asciidoc' from MacPorts
	PATH+=':/opt/local/bin'
	;;
esac

pbuild::configure() {
	cd "${MODULE_SRCDIR}"
	"${MODULE_SRCDIR}"/configure \
		--prefix="${PREFIX}" \
		--with-tcltk \
		|| exit 1
}

pbuild::build() {
        cd "${MODULE_SRCDIR}"
        make

	make -C contrib/subtree prefix="${prefix}"
}

pbuild::install() {
        cd "${MODULE_SRCDIR}"
        make install
        make install-doc
	make -C contrib/subtree prefix="${PREFIX}" install
	make -C contrib/subtree prefix="${PREFIX}" install-doc
}

pbuild::add_to_group 'Tools'
pbuild::set_docfiles 'COPYING' 'README.md'
pbuild::make_all

# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End:
