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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/aide-0.14-r1.ebuild,v 1.1 2010/06/09 16:14:41 matsuu Exp $
EAPI="3"
inherit autotools confutils eutils
DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a replacement for Tripwire"
HOMEPAGE="http://aide.sourceforge.net/"
SRC_URI="mirror://sourceforge/aide/${P}.tar.gz"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
IUSE="acl audit curl mhash nls postgres selinux static xattr zlib"
#IUSE="acl audit curl mhash nls postgres prelink selinux static xattr zlib"
# libsandbox: Can't dlopen libc: (null)
#RESTRICT="test"
DEPEND="acl? ( virtual/acl )
audit? ( sys-process/audit )
curl? ( net-misc/curl )
mhash? ( >=app-crypt/mhash-0.9.2 )
!mhash? ( dev-libs/libgcrypt )
nls? ( virtual/libintl )
postgres? ( virtual/postgresql-base )
selinux? ( sys-libs/libselinux )
xattr? ( sys-apps/attr )
zlib? ( sys-libs/zlib )"
# prelink? ( sys-devel/prelink )
RDEPEND="!static? ( ${DEPEND} )"
DEPEND="${DEPEND}
nls? ( sys-devel/gettext )
sys-devel/bison
sys-devel/flex"
pkg_config() {
confutils_use_conflict mhash postgres
confutils_use_conflict curl static
}
src_prepare() {
epatch "${FILESDIR}/${P}-gentoo.patch"
# fix libgcrypt issue, bug #266175
epatch "${FILESDIR}/${PN}-0.13.1-libgrypt_init.patch"
# fix as-need issue, bug #271326
epatch "${FILESDIR}/${P}-as-needed.patch"
# fix zlib issue, bug #316665
epatch "${FILESDIR}/${PN}-0.13.1-zlib.patch"
# fix configure issue, bug #323187
epatch "${FILESDIR}/${P}-configure.patch"
if ! use selinux ; then
sed -i -e 's/\+selinux//' doc/aide.conf.in || die
fi
if ! use xattr ; then
sed -i -e 's/\+xattrs//' doc/aide.conf.in || die
fi
if ! use acl ; then
sed -i -e 's/\+acl//' doc/aide.conf.in || die
fi
eautoreconf
}
src_configure() {
econf \
$(use_with acl posix-acl) \
$(use_with audit) \
$(use_with curl) \
$(use_with !mhash gcrypt) \
$(use_with mhash mhash) \
$(use_with nls locale) \
$(use_with postgres psql) \
$(use_with selinux) \
$(use_enable static) \
$(use_with xattr) \
$(use_with zlib) \
--sysconfdir="${EPREFIX}/etc/aide" || die "econf failed"
# $(use_with prelink)
}
src_install() {
emake DESTDIR="${D}" install install-man || die "emake install failed"
keepdir /var/lib/aide || die
fowners root:0 /var/lib/aide || die
fperms 0755 /var/lib/aide || die
keepdir /var/log/aide || die
insinto /etc/aide
doins "${FILESDIR}"/aide.conf || die
dosbin "${FILESDIR}"/aideinit || die
dodoc ChangeLog AUTHORS NEWS README "${FILESDIR}"/aide.cron || die
dohtml doc/manual.html || die
}
pkg_postinst() {
elog
elog "A sample configuration file has been installed as"
elog "/etc/aide/aide.conf. Please edit to meet your needs."
elog "Read the aide.conf(5) manual page for more information."
elog "A helper script, aideinit, has been installed and can"
elog "be used to make AIDE management easier. Please run"
elog "aideinit --help for more information"
elog
if use postgres; then
elog "Due to a bad assumption by aide, you must issue the following"
elog "command after the database initialization (aide --init ...):"
elog
elog 'psql -c "update pg_index set indisunique=false from pg_class \\ '
elog " where pg_class.relname='TABLE_pkey' and \ "
elog ' pg_class.oid=pg_index.indexrelid" -h HOSTNAME -p PORT DBASE USER'
elog
elog "where TABLE, HOSTNAME, PORT, DBASE, and USER are the same as"
elog "your aide.conf."
elog
fi
}
|