# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="A flexible logging framework for shell scripts"
HOMEPAGE="http://forestent.com/products/log4sh/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

DEPEND=""
RDEPEND=""

src_test() {
	emake test || die "make test failed"
}

src_compile() {
	emake build || die "building failed"
}

src_install() {
	insinto /usr/lib/log4sh
	doins build/log4sh || die "failed to install log4sh"

	dodoc doc/*.txt
	dohtml doc/*.{html,css}

	insinto /usr/share/doc/${PF}
	doins -r src/examples
}

pkg_postinst() {
	elog "To use log4sh, have your script source /usr/lib/log4sh/log4sh."
}