/[gentoo-x86]/net-analyzer/barnyard2/barnyard2-1.8.ebuild
Gentoo

Contents of /net-analyzer/barnyard2/barnyard2-1.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Apr 2 12:54:23 2011 UTC (3 years, 5 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -3 lines
Use net-libs/libpcap instead of virtual/libpcap wrt #358835.

(Portage version: 2.2.0_alpha29/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/barnyard2/barnyard2-1.8.ebuild,v 1.3 2010/06/17 21:44:24 patrick Exp $
4
5 inherit eutils
6
7 DESCRIPTION="Parser for Snort unified/unified2 files"
8 HOMEPAGE="http://www.securixlive.com/barnyard2/"
9 SRC_URI="http://www.securixlive.com/download/barnyard2/${P}.tar.gz"
10 SLOT="0"
11 LICENSE="GPL-2"
12 KEYWORDS="~amd64 ~x86"
13 IUSE="static debug aruba gre mpls prelude ipv6 mysql odbc postgres"
14
15 DEPEND="net-libs/libpcap
16 mysql? ( virtual/mysql )
17 postgres? ( dev-db/postgresql-server )
18 prelude? ( >=dev-libs/libprelude-0.9.0 )
19 odbc? ( dev-db/unixODBC )"
20
21 src_unpack() {
22
23 unpack ${A}
24 cd "${S}"
25
26 }
27
28 src_compile() {
29
30 local myconf
31
32 econf \
33 $(use_enable !static shared) \
34 $(use_enable static) \
35 $(use_enable debug) \
36 $(use_enable aruba) \
37 $(use_enable gre) \
38 $(use_enable mpls) \
39 $(use_enable prelude) \
40 $(use_enable ipv6) \
41 $(use_with mysql) \
42 $(use_with odbc) \
43 $(use_with postgres postgresql) \
44 --without-oracle \
45 ${myconf}
46
47 emake || die "make failed"
48
49 }
50
51 src_install () {
52
53 make DESTDIR="${D}" install || die "make install failed"
54
55 dodir /etc/barnyard2
56
57 # A spool dir is needed to start BY2 and this is the most likely choice.
58 dodir /var/log/snort
59
60 # BY2 doesn't write logs to this dir unless a logging type output plugin
61 # is chosen, but BY2 will not start without a log dir defined.
62 dodir /var/log/barnyard2
63
64 dodoc doc/INSTALL \
65 doc/README \
66 doc/README.aruba \
67 doc/README.database \
68 doc/README.sguil \
69 LICENSE \
70 RELEASE.NOTES
71
72 dodoc schemas/create_db2 \
73 schemas/create_mssql \
74 schemas/create_mysql \
75 schemas/create_oracle.sql \
76 schemas/create_postgresql
77
78 insinto /etc/barnyard2
79 newins etc/barnyard2.conf barnyard2.conf.distrib
80
81 einfo "Making changes to barnyard2.conf.distrib."
82 sed -i -e "s:^#config interface:config interface:" \
83 "${D}etc/barnyard2/barnyard2.conf.distrib" \
84 || die "Failed to update barnyard2.conf.distrib"
85
86 sed -i -e "s:^output alert_fast:#output alert_fast:" \
87 "${D}etc/barnyard2/barnyard2.conf.distrib" \
88 || die "Failed to update barnyard2.conf.distrib"
89
90 newconfd "${FILESDIR}/barnyard2.confd" barnyard2 \
91 || die "Failed to add barnyard2.confd"
92
93 newinitd "${FILESDIR}/barnyard2.initd" barnyard2 \
94 || die "Failed to add barnyard2.initd"
95
96 }
97
98 pkg_postinst() {
99
100 einfo
101 einfo "Barnyard2 is a fork of the original barnyard project "
102 einfo "(which is no longer under development)."
103 einfo
104 einfo "Barnyard2 is designed specifically for Snort's new unified2"
105 einfo "file format. Barnyard2 is under active development and continues"
106 einfo "to adapt based on user feedback."
107 elog
108 elog "For confiuration options, take a look at..."
109 elog
110 elog "/etc/barnyard2/barnyard2.conf.distrib"
111 elog
112 ewarn "The following output plugins are considered 'beta' for ${P}"
113 ewarn "So your milage may very if you use them."
114 ewarn
115 ewarn "alert_arrubaaction"
116 ewarn "alert_cef"
117 ewarn "alert_prelude"
118 ewarn "alert_unixsock"
119 ewarn
120 ewarn "For a list of stable output plugins see..."
121 ewarn
122 ewarn "http://www.securixlive.com/barnyard2/index.php"
123 ewarn
124 ewarn "IMPORTANT:"
125 ewarn
126 ewarn "The settings for 'INTERFACE=' in /etc/conf.d/barnyard2 and"
127 ewarn "for 'config interface' in /etc/barnyard2/barnyard2.conf"
128 ewarn "must be the same!! The PID file for barnyard2 takes the form of"
129 ewarn "barnyard2_<interface>.pid. If conf.d and barnyard2.conf"
130 ewarn "do not match then doing '/etc/init.d/barnyard2 stop' will not work."
131 ewarn
132
133 }

  ViewVC Help
Powered by ViewVC 1.1.20