summaryrefslogtreecommitdiff
blob: 8657bbbb410832d6996f04799010a2572a769e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/logsentry/logsentry-1.1.1.ebuild,v 1.7 2003/01/07 15:58:27 aliz Exp $

S=${WORKDIR}/logcheck-${PV}
DESCRIPTION="LogSentry automatically monitors your system logs and mails security violations to you on a periodic basis"
HOMEPAGE="http://www.psionic.com/products/logsentry.html/"
SRC_URI="http://www.psionic.com/downloads/${P}.tar.gz"

IUSE=""
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 ~ppc sparc"

DEPEND="sys-apps/supersed"
RDEPEND="${DEPEND}
	net-mail/mailx"

src_compile() {

	echo "compile and install mixed in the package makefile"
}

src_install() {

	dodir /usr/bin /etc/logcheck/tmp /etc/cron.hourly
	ssed -i -e 's:/usr/local/bin:/usr/bin:' \
		-e 's:/usr/local/etc:/etc/logcheck:' \
		${S}/systems/linux/logcheck.sh || die
	ssed -i -e "s:/usr/local/bin:${D}/usr/bin:" \
		-e "s:/usr/local/etc:${D}/etc/logcheck:" \
		${S}/Makefile || die
	make CFLAGS="${CFLAGS}" linux || die

	dodoc README* CHANGES LICENSE CREDITS
	dodoc systems/linux/README.*

	cat << EOF > ${D}/etc/cron.hourly/logsentry.cron
#!/bin/sh
#
# Uncomment the following if you want 
# logsentry (logcheck) to run hourly
#
# this is part of the logsentry package
#
#

#/bin/sh /etc/logcheck/logcheck.sh
EOF

}

pkg_postinst() {
	einfo 
	einfo "uncomment the logwatch line in /etc/cron.hourly/logsentry.cron,"
	einfo "or add directly to root's crontab"
	einfo
}