1 |
commit: 1b5793fcd7dcdcb6e28dbbfb79001f9cb4a1a8ea |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 4 18:21:31 2017 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 4 18:21:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b5793fc |
7 |
|
8 |
sys-apps/logwatch: Live ebuild added |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/6062 |
11 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
12 |
|
13 |
sys-apps/logwatch/logwatch-9999.ebuild | 95 ++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 95 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/logwatch/logwatch-9999.ebuild b/sys-apps/logwatch/logwatch-9999.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..93f1e8caf37 |
19 |
--- /dev/null |
20 |
+++ b/sys-apps/logwatch/logwatch-9999.ebuild |
21 |
@@ -0,0 +1,95 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI="6" |
26 |
+ |
27 |
+inherit tmpfiles |
28 |
+ |
29 |
+PATCHES=() |
30 |
+ |
31 |
+if [[ ${PV} == "9999" ]] ; then |
32 |
+ EGIT_REPO_URI="https://git.code.sf.net/p/logwatch/git ${PN}" |
33 |
+ inherit git-r3 |
34 |
+else |
35 |
+ SRC_URI="mirror://sourceforge/${PN}/${P}/${P}.tar.gz" |
36 |
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
37 |
+fi |
38 |
+ |
39 |
+DESCRIPTION="Analyzes and Reports on system logs" |
40 |
+HOMEPAGE="http://www.logwatch.org/" |
41 |
+ |
42 |
+LICENSE="MIT" |
43 |
+SLOT="0" |
44 |
+IUSE="" |
45 |
+ |
46 |
+DEPEND="" |
47 |
+RDEPEND="virtual/cron |
48 |
+ virtual/mta |
49 |
+ virtual/mailx |
50 |
+ dev-lang/perl |
51 |
+ dev-perl/Date-Calc |
52 |
+ dev-perl/Date-Manip |
53 |
+ dev-perl/Tie-IxHash |
54 |
+ dev-perl/Sys-CPU |
55 |
+ dev-perl/Sys-MemInfo" |
56 |
+ |
57 |
+src_install() { |
58 |
+ dodir /usr/share/logwatch/lib |
59 |
+ dodir /usr/share/logwatch/scripts/services |
60 |
+ dodir /usr/share/logwatch/scripts/shared |
61 |
+ dodir /usr/share/logwatch/default.conf/logfiles |
62 |
+ dodir /usr/share/logwatch/default.conf/services |
63 |
+ dodir /usr/share/logwatch/default.conf/html |
64 |
+ keepdir /etc/logwatch |
65 |
+ |
66 |
+ # logwatch.pl requires cache dir (bug #607668) |
67 |
+ newtmpfiles "${FILESDIR}"/logwatch.tmpfile ${PN}.conf |
68 |
+ |
69 |
+ newsbin scripts/logwatch.pl logwatch.pl |
70 |
+ |
71 |
+ exeinto /usr/share/logwatch/lib |
72 |
+ doexe lib/*.pm |
73 |
+ |
74 |
+ exeinto /usr/share/logwatch/scripts/services |
75 |
+ doexe scripts/services/* |
76 |
+ |
77 |
+ exeinto /usr/share/logwatch/scripts/shared |
78 |
+ doexe scripts/shared/* |
79 |
+ |
80 |
+ insinto /usr/share/logwatch/default.conf |
81 |
+ doins conf/logwatch.conf |
82 |
+ |
83 |
+ insinto /usr/share/logwatch/default.conf/logfiles |
84 |
+ doins conf/logfiles/* |
85 |
+ |
86 |
+ insinto /usr/share/logwatch/default.conf/services |
87 |
+ doins conf/services/* |
88 |
+ |
89 |
+ insinto /usr/share/logwatch/default.conf/html |
90 |
+ doins conf/html/* |
91 |
+ |
92 |
+ # Make sure logwatch is run before anything else #100243 |
93 |
+ exeinto /etc/cron.daily |
94 |
+ newexe "${FILESDIR}"/logwatch 00-logwatch |
95 |
+ |
96 |
+ doman logwatch.8 |
97 |
+ dodoc README HOWTO-Customize-LogWatch |
98 |
+ |
99 |
+ # Do last due to insopts modification. |
100 |
+ insinto /usr/share/logwatch/scripts/logfiles |
101 |
+ insopts -m755 |
102 |
+ doins -r scripts/logfiles/* |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ # Migration from /etc/cron.daily/logwatch -> /etc/cron.daily/00-logwatch (bug #100243) |
107 |
+ if [[ -e ${ROOT}/etc/cron.daily/logwatch ]] ; then |
108 |
+ local md5=$(md5sum "${ROOT}"/etc/cron.daily/logwatch) |
109 |
+ [[ ${md5} == "edb003cbc0686ed4cf37db16025635f3" ]] \ |
110 |
+ && rm -f "${ROOT}"/etc/cron.daily/logwatch \ |
111 |
+ || ewarn "You have two logwatch files in /etc/cron.daily/" |
112 |
+ fi |
113 |
+ |
114 |
+ # Trigger cache dir creation to allow immediate use of logwatch (bug #607668) |
115 |
+ tmpfiles_process ${PN}.conf |
116 |
+} |