www-apps/icingaweb2: bup
authorMatthew Thode <prometheanfire@gentoo.org>
Tue, 15 Dec 2015 21:53:37 +0000 (15:53 -0600)
committerMatthew Thode <prometheanfire@gentoo.org>
Tue, 15 Dec 2015 21:54:46 +0000 (15:54 -0600)
Package-Manager: portage-2.2.24

www-apps/icingaweb2/Manifest
www-apps/icingaweb2/icingaweb2-2.1.0.ebuild [new file with mode: 0644]

index ef3ac07f8c9fdeeba3b2fadbff00499ac5200956..64660fcfb83c9becce76c182c1de0e7867bcab34 100644 (file)
@@ -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 (file)
index 0000000..f3aaa1a
--- /dev/null
@@ -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."
+}