1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
10 if [[ ${PV} == "9999" ]] ; then
11 EGIT_REPO_URI="https://git.code.sf.net/p/logwatch/git ${PN}"
14 SRC_URI="mirror://sourceforge/${PN}/${P}/${P}.tar.gz"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
18 DESCRIPTION="Analyzes and Reports on system logs"
19 HOMEPAGE="http://www.logwatch.org/"
37 dodir /usr/share/logwatch/lib
38 dodir /usr/share/logwatch/scripts/services
39 dodir /usr/share/logwatch/scripts/shared
40 dodir /usr/share/logwatch/default.conf/logfiles
41 dodir /usr/share/logwatch/default.conf/services
42 dodir /usr/share/logwatch/default.conf/html
45 # logwatch.pl requires cache dir (bug #607668)
46 newtmpfiles "${FILESDIR}"/logwatch.tmpfile ${PN}.conf
48 newsbin scripts/logwatch.pl logwatch.pl
50 exeinto /usr/share/logwatch/lib
53 exeinto /usr/share/logwatch/scripts/services
54 doexe scripts/services/*
56 exeinto /usr/share/logwatch/scripts/shared
57 doexe scripts/shared/*
59 insinto /usr/share/logwatch/default.conf
60 doins conf/logwatch.conf
62 insinto /usr/share/logwatch/default.conf/logfiles
65 insinto /usr/share/logwatch/default.conf/services
68 insinto /usr/share/logwatch/default.conf/html
71 # Make sure logwatch is run before anything else #100243
72 exeinto /etc/cron.daily
73 newexe "${FILESDIR}"/logwatch 00-logwatch
76 dodoc README HOWTO-Customize-LogWatch
78 # Do last due to insopts modification.
79 insinto /usr/share/logwatch/scripts/logfiles
81 doins -r scripts/logfiles/*
85 # Migration from /etc/cron.daily/logwatch -> /etc/cron.daily/00-logwatch (bug #100243)
86 if [[ -e ${ROOT}/etc/cron.daily/logwatch ]] ; then
87 local md5=$(md5sum "${ROOT}"/etc/cron.daily/logwatch)
88 [[ ${md5} == "edb003cbc0686ed4cf37db16025635f3" ]] \
89 && rm -f "${ROOT}"/etc/cron.daily/logwatch \
90 || ewarn "You have two logwatch files in /etc/cron.daily/"
93 # Trigger cache dir creation to allow immediate use of logwatch (bug #607668)
94 tmpfiles_process ${PN}.conf