1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="A log analyzer for postfix"
8 HOMEPAGE="http://logreporters.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/logreporters/${P}.tgz"
15 # >=sys-apps/logwatch-7.4.0_p170 ships our logwatch scripts and will
16 # thus obsolete this use flag.
19 RDEPEND="dev-lang/perl"
22 # Replace the default config file location with ours.
23 local cfg_default='/usr/local/etc/${progname_prefix}-logwatch.conf'
24 local cfg_gentoo='/etc/${progname_prefix}-logwatch.conf';
25 sed -i "s~${cfg_default}~${cfg_gentoo}~" ${PN} \
26 || die 'failed to update the default config location'
30 # The default make target just outputs instructions. We don't want
31 # the user to see these, so we avoid the default emake.
36 # There are two different "versions" of the package in the
37 # tarball: a standalone executable and a logwatch filter. The
38 # standalone is always installed. However, the logwatch filter is
39 # only installed with USE="logwatch".
40 dodoc Bugs Changes README ${PN}.conf-topn
47 # Remove the taint mode (-T) switch from the header of the
48 # standalone executable, and save the result as our logwatch
51 # We don't do this for the standalone script because it's nice
52 # to have the taint flag when it works.
54 sed 's~^#!/usr/bin/perl -T$~#!/usr/bin/perl~' ${PN} > postfix \
55 || die 'failed to remove the perl taint switch'
57 insinto /etc/logwatch/scripts/services
60 insinto /etc/logwatch/conf/services
61 newins ${PN}.conf postfix.conf