/[gentoo-x86]/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild
Gentoo

Contents of /net-analyzer/sguil-server/sguil-server-0.8.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Nov 21 04:33:40 2012 UTC (5 months, 4 weeks ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Add copyright info to conf.d script. Add GPL-2 to LICENSE (bug #425998).

(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-analyzer/sguil-server/sguil-server-0.8.0.ebuild,v 1.3 2012/06/12 03:11:20 zmedico Exp $
4
5 EAPI=4
6
7 inherit multilib ssl-cert user
8
9 MY_PV="${PV/_p/p}"
10 DESCRIPTION="Daemon for Sguil Network Security Monitoring"
11 HOMEPAGE="http://sguil.sourceforge.net"
12 SRC_URI="mirror://sourceforge/sguil/sguil-server-${MY_PV}.tar.gz"
13 LICENSE="GPL-2 QPL"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="ssl"
17
18 DEPEND=">=dev-lang/tcl-8.3[-threads]
19 >=dev-tcltk/tclx-8.3
20 dev-tcltk/tcllib
21 dev-tcltk/mysqltcl
22 ssl? ( >=dev-tcltk/tls-1.4.1 )"
23 RDEPEND="${DEPEND}
24 net-analyzer/p0f
25 net-analyzer/tcpflow
26 net-misc/openssh"
27
28 S="${WORKDIR}/sguil-${MY_PV}"
29
30 pkg_setup() {
31 enewgroup sguil
32 enewuser sguil -1 -1 /var/lib/sguil sguil
33 }
34
35 src_prepare(){
36 sed -i server/sguild.conf \
37 -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \
38 -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \
39 -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \
40 -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \
41 -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \
42 || die "sed failed"
43 sed -i server/sguild \
44 -e 's:set VERSION "SGUIL-0.6.0":set VERSION "SGUIL-0.6.0p1":' \
45 || die "sed failed"
46 }
47
48 src_install(){
49 dodoc server/sql_scripts/*
50 dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \
51 doc/TODO doc/sguildb.dia
52
53 insopts -m640
54 insinto /etc/sguil
55 doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf}
56
57 insinto /usr/$(get_libdir)/sguild
58 doins server/lib/*
59 dobin server/sguild
60 newinitd "${FILESDIR}/sguild.initd" sguild
61 newconfd "${FILESDIR}/sguild.confd" sguild
62
63 if use ssl; then
64 sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild"
65 fi
66
67 diropts -g sguil -o sguil
68 keepdir /var/run/sguil \
69 /var/lib/sguil \
70 /var/lib/sguil/archive \
71 /var/lib/sguil/rules
72
73 }
74
75 pkg_postinst(){
76 if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then
77 install_cert /etc/sguil/sguild
78 fi
79
80 chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.*
81 chown -R sguil:sguil "${ROOT}"/usr/lib/sguild
82
83 if [ -d "${ROOT}"/etc/snort/rules ] ; then
84 ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME}
85 fi
86
87 elog
88 elog "Please customize the sguild configuration files in /etc/sguild before"
89 elog "trying to run the daemon. Additionally you will need to setup the"
90 elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information."
91 elog "Please note that it is STRONGLY recommended to mount a separate"
92 elog "filesystem at /var/lib/sguil for both space and performance reasons"
93 elog "as a large amount of data will be kept in the directory structure"
94 elog "underneath that top directory."
95 elog
96 elog "You should create the sguild db as per the install instructions in"
97 elog "/usr/share/doc/${PF}/ and use the appropriate"
98 elog "database setup script located in the same directory."
99
100 elog
101 }

  ViewVC Help
Powered by ViewVC 1.1.13