/[gentoo-x86]/net-analyzer/ndoutils/ndoutils-1.4_beta5.ebuild
Gentoo

Contents of /net-analyzer/ndoutils/ndoutils-1.4_beta5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Mar 8 21:21:36 2008 UTC (6 years, 4 months ago) by dertobi123
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump, bug #208471. Add ~amd64 keyword.
(Portage version: 2.1.4.4)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/ndoutils/ndoutils-1.4_beta5.ebuild,v 1.1 2007/09/08 08:34:33 dertobi123 Exp $
4
5 inherit eutils
6
7 MY_P=${P/_beta/b}
8
9 DESCRIPTION="Nagios addon to store Nagios data in a MySQL database"
10 HOMEPAGE="http://www.nagios.org"
11 SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~x86"
16 IUSE=""
17
18 DEPEND="dev-db/mysql"
19 RDEPEND="${DEPEND}
20 >=net-analyzer/nagios-core-2.7"
21
22 S="${WORKDIR}/${MY_P}"
23
24 pkg_setup() {
25 enewgroup nagios
26 enewuser nagios -1 /bin/bash /var/nagios/home nagios
27 }
28
29 src_compile() {
30 econf \
31 --prefix=/usr/nagios \
32 --sysconfdir=/etc/nagios \
33 --enable-mysql \
34 --disable-pgsql || die "econf failed"
35
36 emake || die "emake failed"
37 }
38
39 src_install() {
40 dodir /usr/nagios/bin
41 cp ${S}/src/{file2sock,log2ndo,ndo2db-2x,ndomod-2x.o,sockdebug} ${D}/usr/nagios/bin
42
43 dodir /usr/nagios/share/
44 cp -R ${S}/db ${D}/usr/nagios/share
45
46 chown -R root:nagios ${D}/usr/nagios || die "Failed chown of ${D}/usr/nagios"
47 chmod 750 ${D}/usr/nagios/bin/{file2sock,log2ndo,ndo2db-2x,ndomod-2x.o,sockdebug} || "Failed chmod"
48
49 dodoc README REQUIREMENTS TODO UPGRADING Changelog "docs/NDOUTILS DB Model.pdf" "docs/NDOUtils Documentation.pdf"
50
51 cat << EOF > "${T}"/55-ndoutils-revdep
52 SEARCH_DIRS="/usr/nagios/bin"
53 EOF
54
55 sed -i s:socket_name=/usr/local/nagios/var/ndo.sock:socket_name=/var/nagios/ndo.sock:g ${S}/config/ndo2db.cfg
56
57 insinto /etc/revdep-rebuild
58 doins "${T}"/55-ndoutils-revdep
59
60 insinto /etc/nagios
61 doins ${S}/config/ndo2db.cfg
62 doins ${S}/config/ndomod.cfg
63
64 newinitd ${FILESDIR}/ndo2db.init ndo2db
65 }
66
67 pkg_postinst() {
68 elog "To include NDO in your Nagios setup you'll need to activate the NDO broker module"
69 elog "in /etc/nagios/nagios.cfg:"
70 elog "\tbroker_module=/usr/nagios/bin/ndomod-2x.o config_file=/etc/nagios/ndomod.cfg"
71 }

  ViewVC Help
Powered by ViewVC 1.1.20