]> Pileus Git - ~andy/sunrise/blob - net-mail/amavis-logwatch/amavis-logwatch-1.51.02.ebuild
app-misc/autokey-gtk: Add ~amd64 keyword, EAPI bump
[~andy/sunrise] / net-mail / amavis-logwatch / amavis-logwatch-1.51.02.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 inherit eutils
8
9 DESCRIPTION="A log analyzer for amavisd-new"
10 HOMEPAGE="http://logreporters.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/logreporters/${P}.tgz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="logwatch"
17
18 RDEPEND="dev-lang/perl"
19
20 src_prepare() {
21         epatch "${FILESDIR}/default_config_location.patch"
22 }
23
24 src_compile() {
25         # The default make target just outputs instructions. We don't want
26         # the user to see these, so we avoid emake.
27         :
28 }
29
30 src_install() {
31         # There are two different "versions" of the package in the
32         # tarball: a standalone executable and a logwatch filter. The
33         # standalone is always installed. However, the logwatch filter is
34         # only installed with USE="logwatch".
35         dodoc Bugs Changes README
36         doman ${PN}.1
37         dobin ${PN}
38         insinto /etc
39         doins ${PN}.conf
40
41         if use logwatch; then
42                 # Remove the taint mode (-T) switch from the header of the
43                 # standalone executable, and save the result as our logwatch
44                 # filter.
45                 sed 's~^#!/usr/bin/perl -T$~#!/usr/bin/perl~' ${PN} > amavis \
46                         || die "failed to remove the perl taint switch"
47
48                 insinto /etc/logwatch/scripts/services
49                 doins amavis
50
51                 insinto /etc/logwatch/conf/services
52                 newins ${PN}.conf amavis.conf
53         fi
54 }