|
|
# Copyright 1999-2007 Gentoo Foundation |
# Copyright 1999-2008 Gentoo Foundation |
# Distributed under the terms of the GNU General Public License v2 | # Distributed under the terms of the GNU General Public License v2 |
# $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/aide-0.13.1-r1.ebuild,v 1.1 2007/12/23 06:37:49 matsuu Exp $ | # $Header: /var/cvsroot/gentoo-x86/app-forensics/aide/aide-0.13.1-r1.ebuild,v 1.1 2007/12/23 06:37:49 matsuu Exp $ |
WANT_AUTOCONF='latest' |
|
WANT_AUTOMAKE='latest' |
|
inherit eutils autotools | inherit eutils autotools |
| |
DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a replacement for Tripwire" | DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a replacement for Tripwire" |
|
|
zlib? ( sys-libs/zlib )" | zlib? ( sys-libs/zlib )" |
# audit? ( sys-process/audit ) | # audit? ( sys-process/audit ) |
| |
RDEPEND="!static? ( ${DEPEND} ) |
RDEPEND="!static? ( ${DEPEND} )" |
virtual/mailx" |
|
| |
DEPEND="${DEPEND} | DEPEND="${DEPEND} |
nls? ( sys-devel/gettext ) | nls? ( sys-devel/gettext ) |
|
|
src_unpack() { | src_unpack() { |
unpack ${A} | unpack ${A} |
cd "${S}" | cd "${S}" |
epatch "${FILESDIR}"/${P}-gentoo.patch |
|
|
epatch "${FILESDIR}/${P}-gentoo.patch" |
|
|
|
# fix configure switch |
|
epatch "${FILESDIR}/${P}-configure.patch" |
| |
if ! use mhash ; then | if ! use mhash ; then |
# dev-libs/libgcrypt doesn't support whirlpool algorithm | # dev-libs/libgcrypt doesn't support whirlpool algorithm |
|
|
if ! use acl ; then | if ! use acl ; then |
sed -i -e 's/\+acl//' doc/aide.conf.in || die | sed -i -e 's/\+acl//' doc/aide.conf.in || die |
fi | fi |
|
|
eautoreconf | eautoreconf |
} | } |
| |
src_compile() { | src_compile() { |
local myconf="--sysconfdir=/etc/aide $(use_enable static)" |
local myconf=" |
|
$(use_with acl posix-acl) |
|
$(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=/etc/aide |
|
--with-extra-lib=/usr/lib" |
| |
# --without-* borked |
# $(use_with audit) |
use zlib && myconf="${myconf} --with-zlib" |
|
use nls && myconf="${myconf} --with-locale" |
|
use postgres && myconf="${myconf} --with-psql" |
|
use selinux && myconf="${myconf} --with-selinux" |
|
use acl && myconf="${myconf} --with-posix-acl" |
|
use xattr && myconf="${myconf} --with-xattr" |
|
# use audit && myconf="${myconf} --with-audit" | # use audit && myconf="${myconf} --with-audit" |
| |
# curl doesn't work with static | # curl doesn't work with static |
use curl && ! use static && myconf="${myconf} --with-curl" | use curl && ! use static && myconf="${myconf} --with-curl" |
| |
# If you use dev-libs/libgcrypt, --without-mhash is needed. |
econf ${myconf} || die "econf failed" |
use mhash \ |
# parallel make borked ? |
&& myconf="${myconf} --with-mhash" \ |
emake || die "emake failed" |
|| myconf="${myconf} --with-gcrypt --without-mhash" |
|
|
|
econf ${myconf} || die |
|
# parallel make borked |
|
emake -j1 || die |
|
} | } |
| |
src_install() { | src_install() { |
emake DESTDIR="${D}" install || die |
emake DESTDIR="${D}" install || die "emake install failed" |
| |
keepdir /var/lib/aide | keepdir /var/lib/aide |
keepdir /var/log/aide | keepdir /var/log/aide |
| |
insinto /etc/aide | insinto /etc/aide |
doins "${FILESDIR}"/aide.conf | doins "${FILESDIR}"/aide.conf |
# doins doc/aide.conf |
|
|
insinto /etc/cron.daily |
|
doins "${FILESDIR}"/aide.cron |
| |
dosbin "${FILESDIR}"/aideinit | dosbin "${FILESDIR}"/aideinit |
| |
dodoc ChangeLog AUTHORS NEWS README "${FILESDIR}"/aide.cron |
dodoc ChangeLog AUTHORS NEWS README |
dohtml doc/manual.html | dohtml doc/manual.html |
} | } |
| |
pkg_postinst() { | pkg_postinst() { |
chown root:0 /var/lib/aide |
fowners root:0 /var/lib/aide |
chmod 0755 /var/lib/aide |
fperms 0755 /var/lib/aide |
| |
elog | elog |
elog "A sample configuration file has been installed as" | elog "A sample configuration file has been installed as" |