# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="A log analyzer for postfix." HOMEPAGE="http://www.mikecappella.com/logwatch/" SRC_URI="${HOMEPAGE}/release/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="logwatch" DEPEND="dev-lang/perl" RDEPEND="${DEPEND}" src_compile() { # Do nothing. In particular, don't make. : } src_install() { # There are two different "versions" of the package in the # tarball: a standalone and a logwatch filter. We always install # the standalone script and conf file; however, we only install # the logwatch filter and logwatch conf file with USE="logwatch". dodoc Bugs dodoc Changes dodoc README # This is an additional (example) config file. # Might as well include it if it exists. if [ -f "${PN}.conf-topn" ]; then dodoc "${PN}.conf-topn" fi doman "${PN}.1" dohtml "${PN}.1.html" dobin "${PN}" insinto /etc doins "${PN}.conf" if use logwatch; then local logwatch_service_dir=/etc/logwatch/scripts/services local logwatch_conf_dir=/etc/logwatch/conf/services # Make a copy of the standalone to be used as the logwatch filter. cp "${PN}" postfix # And remove the taint mode (-T) switch from the header of the # logwatch filter. sed -i 's~^#!/usr/bin/perl -T$~#!/usr/bin/perl~' postfix insinto "$logwatch_service_dir" doins postfix insinto "$logwatch_conf_dir" newins "${PN}.conf" postfix.conf fi }