| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/argus/argus-3.0.6.1.ebuild,v 1.4 2012/09/23 08:56:04 phajdan.jr Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
|
| 7 |
inherit autotools eutils user
|
| 8 |
|
| 9 |
DESCRIPTION="network Audit Record Generation and Utilization System"
|
| 10 |
HOMEPAGE="http://www.qosient.com/argus/"
|
| 11 |
SRC_URI="http://qosient.com/argus/dev/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="GPL-3"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
| 16 |
IUSE="debug sasl tcpd"
|
| 17 |
|
| 18 |
RDEPEND="
|
| 19 |
net-libs/libpcap
|
| 20 |
sys-libs/zlib
|
| 21 |
sasl? ( dev-libs/cyrus-sasl )
|
| 22 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
|
| 23 |
"
|
| 24 |
|
| 25 |
DEPEND="
|
| 26 |
${RDEPEND}
|
| 27 |
>=sys-devel/bison-1.28
|
| 28 |
>=sys-devel/flex-2.4.6
|
| 29 |
"
|
| 30 |
|
| 31 |
src_prepare() {
|
| 32 |
sed -e 's:/etc/argus.conf:/etc/argus/argus.conf:' \
|
| 33 |
-i argus/argus.c \
|
| 34 |
-i support/Config/argus.conf \
|
| 35 |
-i man/man8/argus.8 \
|
| 36 |
-i man/man5/argus.conf.5 || die
|
| 37 |
|
| 38 |
sed -e 's:#\(ARGUS_SETUSER_ID=\).*:\1argus:' \
|
| 39 |
-e 's:#\(ARGUS_SETGROUP_ID=\).*:\1argus:' \
|
| 40 |
-e 's:\(#ARGUS_CHROOT_DIR=\).*:\1/var/lib/argus:' \
|
| 41 |
-i support/Config/argus.conf || die
|
| 42 |
epatch \
|
| 43 |
"${FILESDIR}"/${PN}-3.0.4-disable-tcp-wrappers-automagic.patch \
|
| 44 |
"${FILESDIR}"/${PN}-3.0.5-Makefile.patch
|
| 45 |
eautoreconf
|
| 46 |
}
|
| 47 |
|
| 48 |
src_configure() {
|
| 49 |
use debug && touch .debug # enable debugging
|
| 50 |
econf $(use_with tcpd wrappers) $(use_with sasl)
|
| 51 |
}
|
| 52 |
|
| 53 |
src_compile() {
|
| 54 |
emake CCOPT="${CFLAGS} ${LDFLAGS}"
|
| 55 |
}
|
| 56 |
|
| 57 |
src_install () {
|
| 58 |
doman man/man5/* man/man8/*
|
| 59 |
dosbin bin/argus{,bug}
|
| 60 |
|
| 61 |
dodoc ChangeLog CREDITS README
|
| 62 |
|
| 63 |
insinto /etc/argus
|
| 64 |
doins support/Config/argus.conf
|
| 65 |
|
| 66 |
newinitd "${FILESDIR}/argus.initd" argus
|
| 67 |
dodir /var/lib/argus
|
| 68 |
}
|
| 69 |
|
| 70 |
pkg_preinst() {
|
| 71 |
enewgroup argus
|
| 72 |
enewuser argus -1 -1 /var/lib/argus argus
|
| 73 |
}
|
| 74 |
|
| 75 |
pkg_postinst() {
|
| 76 |
elog "Note, if you modify ARGUS_DAEMON value in argus.conf it's quite"
|
| 77 |
elog "possible that init script will fail to work."
|
| 78 |
}
|