#!/usr/bin/env modbuild

pbuild::set_download_url "http://www.kernel.org/pub/software/scm/$P/$P-${V_PKG}.tar.gz"
pbuild::add_to_group 'Tools'
pbuild::compile_in_sourcetree
pbuild::install_docfiles 'COPYING' 'README.md'

pbuild::pre_configure_Darwin() {
	export NO_APPLE_COMMON_CRYPTO=1
}

pbuild::pre_configure() {
	pbuild::add_configure_args "--with-tcltk"
	pbuild::add_configure_args "--with-perl=${PERL_PREFIX}/bin/perl"
}

pbuild::post_compile() {
	make -C contrib/subtree prefix="${prefix}"
}

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

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