Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/icingaweb2/
Date: Tue, 15 Dec 2015 21:55:19
Message-Id: 1450216486.224f20fba3f4b319c9c9f8997c9e6e7345704162.prometheanfire@gentoo
1 commit: 224f20fba3f4b319c9c9f8997c9e6e7345704162
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 15 21:53:37 2015 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 15 21:54:46 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=224f20fb
7
8 www-apps/icingaweb2: bup
9
10 Package-Manager: portage-2.2.24
11
12 www-apps/icingaweb2/Manifest | 1 +
13 www-apps/icingaweb2/icingaweb2-2.1.0.ebuild | 65 +++++++++++++++++++++++++++++
14 2 files changed, 66 insertions(+)
15
16 diff --git a/www-apps/icingaweb2/Manifest b/www-apps/icingaweb2/Manifest
17 index ef3ac07..64660fc 100644
18 --- a/www-apps/icingaweb2/Manifest
19 +++ b/www-apps/icingaweb2/Manifest
20 @@ -1 +1,2 @@
21 DIST icingaweb2-2.0.0.tar.gz 9854668 SHA256 a6a5383049e632108ce19b4b85f16a7fdd2f5acb3a6d2af3935254e2bc7fb2e6 SHA512 fb0094b19429d7da533f05ffcb601b47a231e0d5af076775ea8a7c487b0584884172041f443851132bc27634de341190a97e76c750b529dc91b23d166e70ed58 WHIRLPOOL 2d88174296a29b576ba1d4bcf0bcf5a75d166e41c0972327c4c418d3e7bb54ebd74d5d59318c40dc9767d2271954750f9f7248072c8cced6c892a96e5ff5900a
22 +DIST icingaweb2-2.1.0.tar.gz 9957758 SHA256 1fa15efe4056eca4012358d009da1b90c4b4dd3e18d446de33eeaa48728389fd SHA512 fa694bdaba51b82c33b8fd726807df4c626cd944f1d2949cc8768df3e9bbebdb78888f6aaeba2e88f1f843dab8608d69e1b69f6630e438ab9854d3c8b99f4502 WHIRLPOOL 6b3cba5a701757000909c664d115755efaf3564a77a34a71bc4baa96b058efe1d682867fbaedae22e6a1126aa3dfb47389f8474c42f5a45fbffebc77529a7261
23
24 diff --git a/www-apps/icingaweb2/icingaweb2-2.1.0.ebuild b/www-apps/icingaweb2/icingaweb2-2.1.0.ebuild
25 new file mode 100644
26 index 0000000..f3aaa1a
27 --- /dev/null
28 +++ b/www-apps/icingaweb2/icingaweb2-2.1.0.ebuild
29 @@ -0,0 +1,65 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI="5"
35 +
36 +inherit depend.apache eutils multilib user
37 +
38 +DESCRIPTION="Icinga Web 2 - Frontend for icinga2"
39 +HOMEPAGE="http://www.icinga.org/"
40 +SRC_URI="https://codeload.github.com/Icinga/${PN}/tar.gz/v${PV} -> ${P}.tar.gz"
41 +LICENSE="GPL-2"
42 +SLOT="0"
43 +IUSE="apache2 ldap mysql nginx postgres"
44 +KEYWORDS="~amd64 ~x86"
45 +
46 +DEPEND=">=net-analyzer/icinga2-2.1.1
47 + dev-lang/php:*[apache2?,cli,gd,json,intl,ldap?,mysql?,pdo,postgres?,sockets,ssl,xslt,xml]
48 + dev-php/pecl-imagick
49 + apache2? ( >=www-servers/apache-2.4.0 )
50 + nginx? ( >=www-servers/nginx-1.7.0:* )"
51 +RDEPEND="${DEPEND}"
52 +
53 +pkg_setup() {
54 + if use apache2 ; then
55 + want_apache2
56 + depend.apache_pkg_setup
57 + fi
58 +
59 + enewgroup icingaweb2
60 + enewgroup icingacmd
61 + use nginx && usermod -a -G icingacmd,icingaweb2 nginx
62 + use apache2 && usermod -a -G icingacmd,icingaweb2 apache2
63 +}
64 +
65 +pkg_config() {
66 + if [[ -d /etc/icingaweb2 ]] ; then
67 + einfo "Updating existing installation ..."
68 + else
69 + einfo "Running first time setup ..."
70 + einfo "Creating configuration directory ..."
71 + /usr/share/${PN}/bin/icingacli setup config directory
72 + einfo "Creating authentication token for web setup ..."
73 + /usr/share/${PN}/bin/icingacli setup token create
74 + if use apache2 ; then
75 + einfo "The following might be useful for your Apache2 configuration:"
76 + /usr/share/${PN}/bin/icingacli setup config webserver apache --document-root /usr/share/${PN}/public
77 + fi
78 + if use nginx ; then
79 + einfo "The following might be useful for your NGinx configuration:"
80 + /usr/share/${PN}/bin/icingacli setup config webserver nginx --document-root /usr/share/${PN}/public
81 + fi
82 + fi
83 + einfo "All done."
84 +}
85 +
86 +src_install() {
87 + mkdir -p "${D}/usr/share/${PN}"
88 + cp -R "${S}"/* "${D}/usr/share/${PN}"
89 + chmod -R a+rX "${D}/usr/share/${PN}/public"
90 +}
91 +
92 +pkg_postinst() {
93 + einfo "Run 'emerge --config =${CATEGORY}/${PF}' to finish setup."
94 +}