Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/prometheanfire:master commit in: net-analyzer/icinga-web/
Date: Mon, 27 Feb 2012 22:02:00
Message-Id: 1330380074.8d7d87997d8b3dfd1bd0a3c73f3a6f96b6ba2f64.prometheanfire@gentoo
1 commit: 8d7d87997d8b3dfd1bd0a3c73f3a6f96b6ba2f64
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 27 22:01:14 2012 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 27 22:01:14 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/prometheanfire.git;a=commit;h=8d7d8799
7
8 initial add of icinga-web
9
10 ---
11 net-analyzer/icinga-web/ChangeLog | 9 ++
12 net-analyzer/icinga-web/icinga-web-1.6.1-r1.ebuild | 82 ++++++++++++++++++++
13 2 files changed, 91 insertions(+), 0 deletions(-)
14
15 diff --git a/net-analyzer/icinga-web/ChangeLog b/net-analyzer/icinga-web/ChangeLog
16 new file mode 100644
17 index 0000000..716e172
18 --- /dev/null
19 +++ b/net-analyzer/icinga-web/ChangeLog
20 @@ -0,0 +1,9 @@
21 +# ChangeLog for net-analyzer/icinga-web
22 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
23 +# $Header: $
24 +
25 +*icinga-web-1.6.1-r1 (27 Feb 2012)
26 +
27 + 27 Feb 2012; mthode <mthode@g.o> +icinga-web-1.6.1-r1.ebuild:
28 + initial add and test of icinga-web
29 +
30
31 diff --git a/net-analyzer/icinga-web/icinga-web-1.6.1-r1.ebuild b/net-analyzer/icinga-web/icinga-web-1.6.1-r1.ebuild
32 new file mode 100644
33 index 0000000..b6289b7
34 --- /dev/null
35 +++ b/net-analyzer/icinga-web/icinga-web-1.6.1-r1.ebuild
36 @@ -0,0 +1,82 @@
37 +# Copyright 1999-2012 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Header: $
40 +
41 +EAPI="2"
42 +
43 +inherit depend.apache eutils
44 +
45 +DESCRIPTION="Icinga Web - new Web Interface"
46 +HOMEPAGE="http://www.icinga.org/"
47 +SRC_URI="mirror://sourceforge/icinga/${P}.tar.gz"
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64"
51 +IUSE="pnp"
52 +DEPEND="dev-php/phing
53 + dev-lang/php[apache2,mysql,pdo,json]
54 + net-analyzer/icinga[apache2,idoutils,mysql]"
55 +RDEPEND="${DEPEND}"
56 +
57 +need_apache2
58 +
59 +pkg_setup() {
60 + depend.apache_pkg_setup
61 +}
62 +
63 +src_configure() {
64 + local myconf
65 +
66 + myconf="--prefix=/usr/share/icinga/icinga-web
67 + --bindir=/usr/sbin
68 + --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
69 + --datarootdir=/usr/share/icinga/htdocs
70 + --localstatedir=/var/lib/icinga
71 + --sysconfdir=/etc/icinga
72 + --libexecdir=/usr/$(get_libdir)/icinga/plugins
73 + --with-bin-user=icinga
74 + --with-bin-group=icinga
75 + --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
76 + --with-conf-dir=/etc/icinga-web
77 + --with-web-apache-path=${APACHE_MODULES_CONFDIR}
78 + --with-log-dir=/var/log/icinga-web"
79 +
80 + econf ${myconf}
81 +}
82 +
83 +src_install() {
84 + emake -j1 DESTDIR="${D}" install || die "make failed"
85 +
86 + emake -j1 DESTDIR="${D}" install-javascript || die "make failed"
87 +
88 + dodir ${APACHE_MODULES_CONFDIR}
89 + emake -j1 DESTDIR="${D}" install-apache-config || die "make failed"
90 + mv ${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf ${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf
91 +
92 + insinto /usr/share/icinga/icinga-web/contrib
93 + doins -r etc/schema/* || die
94 +
95 + sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
96 + sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
97 +
98 + insinto /etc/cron.d/
99 + doins etc/scheduler/icingaCron || die
100 +
101 + diropts -o apache -g apache
102 + dodir /var/log/icinga-web
103 +
104 + fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
105 +
106 + if use pnp ; then
107 + sed -i 's/booleanConditionField/booleanConfitionField/g' contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
108 + insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
109 + doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
110 + doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
111 + fi
112 +}
113 +
114 +pkg_postinst() {
115 + elog "do not forget to import the Database!"
116 + elog
117 +}
118 +