/[gentoo-x86]/net-firewall/psad/psad-2.2-r1.ebuild
Gentoo

Contents of /net-firewall/psad/psad-2.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Nov 21 19:23:45 2012 UTC (21 months, 4 weeks ago) by jer
Branch: MAIN
Install /etc/psad/icmp6_types by Graham Murray (bug #444208).

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key A792A613)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-firewall/psad/psad-2.2.ebuild,v 1.1 2012/11/21 06:42:19 jer Exp $
4
5 EAPI=4
6 #PERL_EXPORT_PHASE_FUNCTIONS=no
7 inherit eutils perl-module toolchain-funcs
8
9 DESCRIPTION="Port Scanning Attack Detection daemon"
10 SRC_URI="http://www.cipherdyne.org/psad/download/${P}.tar.bz2"
11 HOMEPAGE="http://www.cipherdyne.org/psad"
12
13 SLOT="0"
14 LICENSE="GPL-2"
15 KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
16 IUSE=""
17
18 DEPEND="virtual/perl-ExtUtils-MakeMaker"
19 RDEPEND="
20 dev-perl/Bit-Vector
21 dev-perl/Date-Calc
22 dev-perl/NetAddr-IP
23 dev-perl/Unix-Syslog
24 net-firewall/iptables
25 net-misc/whois
26 virtual/logger
27 virtual/mailx
28 virtual/perl-Storable
29 "
30
31 src_prepare() {
32 epatch "${FILESDIR}"/${PN}-2.2-var-run.patch
33
34 sed -i \
35 -e 's|/usr/bin/gcc|$(CC)|g' \
36 -e 's|-O|$(CFLAGS) $(LDFLAGS)|g' \
37 Makefile || die
38 # Fix up default paths
39 sed -i \
40 -e "s:/sbin/syslog-ng:/usr/sbin/syslog-ng:g" \
41 -e "s:/sbin/syslogd:/usr/sbin/syslogd:g" \
42 -e "s:/usr/bin/whois_psad:/usr/bin/whois:g" \
43 psad.conf || die
44 }
45
46 src_configure() {
47 default
48
49 local deps_subdir
50 for deps_subdir in IPTables-Parse IPTables-ChainMgr; do
51 cd "${S}"/deps/${deps_subdir} || die
52 SRC_PREP="no" perl-module_src_configure
53 done
54 }
55
56 src_compile() {
57 tc-export CC
58 default
59
60 local deps_subdir
61 for deps_subdir in IPTables-Parse IPTables-ChainMgr; do
62 cd "${S}"/deps/${deps_subdir} || die
63 perl-module_src_compile
64 done
65 }
66
67 src_install() {
68 newbin pscan psad-pscan
69
70 insinto /usr
71 dosbin kmsgsd psad psadwatchd
72 newsbin fwcheck_psad.pl fwcheck_psad
73
74 insinto /etc/psad
75 doins *.conf auto_dl icmp{,6}_types ip_options psad_* pf.os posf signatures
76
77 newinitd init-scripts/psad-init.gentoo psad
78
79 doman *.8
80
81 dodoc BENCHMARK CREDITS Change* FW_EXAMPLE_RULES README SCAN_LOG
82
83 keepdir /var/lib/${PN} /var/log/${PN}
84
85 dodir /etc/psad/snort_rules
86 insinto /etc/psad/snort_rules
87 doins deps/snort_rules/*
88
89 local deps_subdir
90 for deps_subdir in IPTables-Parse IPTables-ChainMgr; do
91 cd "${S}"/deps/${deps_subdir} || die
92 perl-module_src_install
93 done
94 }
95
96 pkg_postinst() {
97 if [ ! -p "${ROOT}"/var/lib/psad/psadfifo ]
98 then
99 ebegin "Creating syslog FIFO for PSAD"
100 mknod -m 600 "${ROOT}"/var/lib/psad/psadfifo p
101 eend $?
102 fi
103 }

  ViewVC Help
Powered by ViewVC 1.1.20