]> gitweb.michael.orlitzky.com - mjo-overlay.git/blob - sys-apps/logwatch/logwatch-7.4.0_p170-r1.ebuild
Add logwatch-7.4.0_p170-r1 to fix a file collision.
[mjo-overlay.git] / sys-apps / logwatch / logwatch-7.4.0_p170-r1.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6
7 inherit eutils
8
9 DESCRIPTION="Analyzes and Reports on system logs"
10 HOMEPAGE="http://www.logwatch.org/"
11 #SRC_URI="mirror://sourceforge/${PN}/${P}/${P}.tar.gz"
12 SRC_URI="http://dev.gentoo.org/~polynomial-c/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
17 IUSE=""
18
19 DEPEND=""
20 RDEPEND="virtual/cron
21 virtual/mta
22 virtual/mailx
23 dev-lang/perl
24 dev-perl/Date-Calc
25 dev-perl/DateManip
26 dev-perl/Tie-IxHash
27 dev-perl/Sys-CPU
28 dev-perl/Sys-MemInfo"
29
30 src_prepare() {
31 epatch "${FILESDIR}/${P/_p*}-openssh-hpn.patch"
32 }
33
34 src_install() {
35 dodir /usr/share/logwatch/lib
36 dodir /usr/share/logwatch/scripts/services
37 dodir /usr/share/logwatch/scripts/shared
38 dodir /usr/share/logwatch/default.conf/logfiles
39 dodir /usr/share/logwatch/default.conf/services
40 dodir /usr/share/logwatch/default.conf/html
41 keepdir /etc/logwatch
42 keepdir /var/cache/logwatch
43
44 newsbin scripts/logwatch.pl logwatch.pl || die "dosbin logwatch failed"
45
46 for i in scripts/logfiles/* ; do
47 exeinto /usr/share/logwatch/$i
48 doexe $i/* || die "doexe $i failed"
49 done
50
51 exeinto /usr/share/logwatch/lib
52 doexe lib/*.pm
53
54 exeinto /usr/share/logwatch/scripts/services
55 doexe scripts/services/*
56
57 exeinto /usr/share/logwatch/scripts/shared
58 doexe scripts/shared/*
59
60 insinto /usr/share/logwatch/default.conf
61 doins conf/logwatch.conf
62
63 insinto /usr/share/logwatch/default.conf/logfiles
64 doins conf/logfiles/*
65
66 insinto /usr/share/logwatch/default.conf/services
67 doins conf/services/*
68
69 insinto /usr/share/logwatch/default.conf/html
70 doins conf/html/*
71
72 # Make sure logwatch is run before anything else #100243
73 exeinto /etc/cron.daily
74 newexe "${FILESDIR}"/logwatch 00-logwatch
75
76 doman logwatch.8
77 dodoc README HOWTO-Customize-LogWatch
78 }
79
80 pkg_postinst() {
81 if [[ -e ${ROOT}/etc/cron.daily/logwatch ]] ; then
82 local md5=$(md5sum "${ROOT}"/etc/cron.daily/logwatch)
83 [[ ${md5} == "edb003cbc0686ed4cf37db16025635f3" ]] \
84 && rm -f "${ROOT}"/etc/cron.daily/logwatch \
85 || ewarn "You have two logwatch files in /etc/cron.daily/"
86 fi
87 }