summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2015-12-15 15:53:37 -0600
committerMatthew Thode <prometheanfire@gentoo.org>2015-12-15 15:54:46 -0600
commit224f20fba3f4b319c9c9f8997c9e6e7345704162 (patch)
tree8181f47a4e4222045b43655ced2ba925da5853dd
parentsys-auth/keystone: bup (diff)
downloadgentoo-224f20fba3f4b319c9c9f8997c9e6e7345704162.tar.gz
gentoo-224f20fba3f4b319c9c9f8997c9e6e7345704162.tar.bz2
gentoo-224f20fba3f4b319c9c9f8997c9e6e7345704162.zip
www-apps/icingaweb2: bup
Package-Manager: portage-2.2.24
-rw-r--r--www-apps/icingaweb2/Manifest1
-rw-r--r--www-apps/icingaweb2/icingaweb2-2.1.0.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/www-apps/icingaweb2/Manifest b/www-apps/icingaweb2/Manifest
index ef3ac07f8c9f..64660fcfb83c 100644
--- a/www-apps/icingaweb2/Manifest
+++ b/www-apps/icingaweb2/Manifest
@@ -1 +1,2 @@
DIST icingaweb2-2.0.0.tar.gz 9854668 SHA256 a6a5383049e632108ce19b4b85f16a7fdd2f5acb3a6d2af3935254e2bc7fb2e6 SHA512 fb0094b19429d7da533f05ffcb601b47a231e0d5af076775ea8a7c487b0584884172041f443851132bc27634de341190a97e76c750b529dc91b23d166e70ed58 WHIRLPOOL 2d88174296a29b576ba1d4bcf0bcf5a75d166e41c0972327c4c418d3e7bb54ebd74d5d59318c40dc9767d2271954750f9f7248072c8cced6c892a96e5ff5900a
+DIST icingaweb2-2.1.0.tar.gz 9957758 SHA256 1fa15efe4056eca4012358d009da1b90c4b4dd3e18d446de33eeaa48728389fd SHA512 fa694bdaba51b82c33b8fd726807df4c626cd944f1d2949cc8768df3e9bbebdb78888f6aaeba2e88f1f843dab8608d69e1b69f6630e438ab9854d3c8b99f4502 WHIRLPOOL 6b3cba5a701757000909c664d115755efaf3564a77a34a71bc4baa96b058efe1d682867fbaedae22e6a1126aa3dfb47389f8474c42f5a45fbffebc77529a7261
diff --git a/www-apps/icingaweb2/icingaweb2-2.1.0.ebuild b/www-apps/icingaweb2/icingaweb2-2.1.0.ebuild
new file mode 100644
index 000000000000..f3aaa1adfeb2
--- /dev/null
+++ b/www-apps/icingaweb2/icingaweb2-2.1.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache eutils multilib user
+
+DESCRIPTION="Icinga Web 2 - Frontend for icinga2"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="https://codeload.github.com/Icinga/${PN}/tar.gz/v${PV} -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="apache2 ldap mysql nginx postgres"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=net-analyzer/icinga2-2.1.1
+ dev-lang/php:*[apache2?,cli,gd,json,intl,ldap?,mysql?,pdo,postgres?,sockets,ssl,xslt,xml]
+ dev-php/pecl-imagick
+ apache2? ( >=www-servers/apache-2.4.0 )
+ nginx? ( >=www-servers/nginx-1.7.0:* )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if use apache2 ; then
+ want_apache2
+ depend.apache_pkg_setup
+ fi
+
+ enewgroup icingaweb2
+ enewgroup icingacmd
+ use nginx && usermod -a -G icingacmd,icingaweb2 nginx
+ use apache2 && usermod -a -G icingacmd,icingaweb2 apache2
+}
+
+pkg_config() {
+ if [[ -d /etc/icingaweb2 ]] ; then
+ einfo "Updating existing installation ..."
+ else
+ einfo "Running first time setup ..."
+ einfo "Creating configuration directory ..."
+ /usr/share/${PN}/bin/icingacli setup config directory
+ einfo "Creating authentication token for web setup ..."
+ /usr/share/${PN}/bin/icingacli setup token create
+ if use apache2 ; then
+ einfo "The following might be useful for your Apache2 configuration:"
+ /usr/share/${PN}/bin/icingacli setup config webserver apache --document-root /usr/share/${PN}/public
+ fi
+ if use nginx ; then
+ einfo "The following might be useful for your NGinx configuration:"
+ /usr/share/${PN}/bin/icingacli setup config webserver nginx --document-root /usr/share/${PN}/public
+ fi
+ fi
+ einfo "All done."
+}
+
+src_install() {
+ mkdir -p "${D}/usr/share/${PN}"
+ cp -R "${S}"/* "${D}/usr/share/${PN}"
+ chmod -R a+rX "${D}/usr/share/${PN}/public"
+}
+
+pkg_postinst() {
+ einfo "Run 'emerge --config =${CATEGORY}/${PF}' to finish setup."
+}