/[gentoo-x86]/net-analyzer/pnp4nagios/pnp4nagios-0.6.18.ebuild
Gentoo

Contents of /net-analyzer/pnp4nagios/pnp4nagios-0.6.18.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat May 11 13:43:34 2013 UTC (16 months, 1 week ago) by idl0r
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump. Remove old versions.

(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)

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/pnp4nagios/pnp4nagios-0.6.18.ebuild,v 1.1 2012/07/22 21:45:07 idl0r Exp $
4
5 EAPI="4"
6
7 inherit depend.apache eutils
8
9 DESCRIPTION="A performance data analyzer for nagios"
10 HOMEPAGE="http://www.pnp4nagios.org"
11
12 SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 IUSE=""
17 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
18
19 DEPEND="dev-lang/php[json,simplexml,zlib,xml,filter]
20 >=dev-lang/php-5.3
21 >=net-analyzer/rrdtool-1.2[perl]
22 || ( net-analyzer/nagios-core net-analyzer/icinga )"
23 RDEPEND="${DEPEND}
24 virtual/perl-Getopt-Long
25 virtual/perl-Time-HiRes
26 media-fonts/dejavu
27 apache2? ( www-servers/apache[apache2_modules_rewrite] )"
28
29 want_apache2
30
31 pkg_setup() {
32 depend.apache_pkg_setup
33 }
34
35 src_prepare() {
36 epatch "${FILESDIR}"/${PN}-0.6.14-makefile.patch
37 }
38
39 src_configure() {
40 local var_dir=
41 local user_group=
42
43 if has_version net-analyzer/nagios-core; then
44 var_dir=/var/nagios/
45 user_group=nagios
46 else
47 var_dir=/var/lib/icinga/
48 user_group=icinga
49 fi
50
51 econf \
52 --sysconfdir=/etc/pnp \
53 --datarootdir=/usr/share/pnp \
54 --mandir=/usr/share/man \
55 --with-perfdata-dir=${var_dir}/perfdata \
56 --with-nagios-user=${user_group} \
57 --with-nagios-group=${user_group} \
58 --with-perfdata-logfile=${var_dir}/perfdata.log \
59 --with-perfdata-spool-dir=/var/spool/pnp
60 }
61
62 src_compile() {
63 # The default target just shows a help
64 emake all
65 }
66
67 src_install() {
68 emake DESTDIR="${D}" install install-config || die "emake install failed"
69 newinitd "${FILESDIR}/npcd.initd" npcd
70 rm "${D}/usr/share/pnp/install.php"
71
72 if use apache2 ; then
73 insinto "${APACHE_MODULES_CONFDIR}"
74 doins "${FILESDIR}"/98_pnp4nagios.conf
75 fi
76 }
77
78 pkg_postinst() {
79 elog "Please make sure to enable URL rewriting in Apache or any other"
80 elog "webserver you're using, to get pnp4nagios running!"
81 }

  ViewVC Help
Powered by ViewVC 1.1.20