1 |
commit: 4ff186f5a4b20462ab25081ff1080c16245a27ce |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 28 15:27:07 2016 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 28 15:27:41 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ff186f5 |
7 |
|
8 |
www-apps/icingaweb2: adding 9999 version |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
www-apps/icingaweb2/icingaweb2-9999.ebuild | 66 ++++++++++++++++++++++++++++++ |
13 |
1 file changed, 66 insertions(+) |
14 |
|
15 |
diff --git a/www-apps/icingaweb2/icingaweb2-9999.ebuild b/www-apps/icingaweb2/icingaweb2-9999.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..17371c7 |
18 |
--- /dev/null |
19 |
+++ b/www-apps/icingaweb2/icingaweb2-9999.ebuild |
20 |
@@ -0,0 +1,66 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI="5" |
26 |
+ |
27 |
+inherit depend.apache eutils git-2 multilib user |
28 |
+ |
29 |
+DESCRIPTION="Icinga Web 2 - Frontend for icinga2" |
30 |
+HOMEPAGE="http://www.icinga.org/" |
31 |
+EGIT_REPO_URI="https://github.com/Icinga/icingaweb2.git" |
32 |
+EGIT_BRANCH="master" |
33 |
+ |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+IUSE="apache2 ldap mysql nginx postgres" |
37 |
+KEYWORDS="" |
38 |
+ |
39 |
+DEPEND=">=net-analyzer/icinga2-2.1.1 |
40 |
+ dev-lang/php:*[apache2?,cli,gd,json,intl,ldap?,mysql?,pdo,postgres?,sockets,ssl,xslt,xml] |
41 |
+ dev-php/pecl-imagick |
42 |
+ apache2? ( >=www-servers/apache-2.4.0 ) |
43 |
+ nginx? ( >=www-servers/nginx-1.7.0:* )" |
44 |
+RDEPEND="${DEPEND}" |
45 |
+ |
46 |
+want_apache2 |
47 |
+ |
48 |
+pkg_setup() { |
49 |
+ depend.apache_pkg_setup |
50 |
+ |
51 |
+ enewgroup icingaweb2 |
52 |
+ enewgroup icingacmd |
53 |
+ use nginx && usermod -a -G icingacmd,icingaweb2 nginx |
54 |
+ use apache2 && usermod -a -G icingacmd,icingaweb2 apache2 |
55 |
+} |
56 |
+ |
57 |
+pkg_config() { |
58 |
+ if [[ -d /etc/icingaweb2 ]] ; then |
59 |
+ einfo "Updating existing installation ..." |
60 |
+ else |
61 |
+ einfo "Running first time setup ..." |
62 |
+ einfo "Creating configuration directory ..." |
63 |
+ /usr/share/${PN}/bin/icingacli setup config directory |
64 |
+ einfo "Creating authentication token for web setup ..." |
65 |
+ /usr/share/${PN}/bin/icingacli setup token create |
66 |
+ if use apache2 ; then |
67 |
+ einfo "The following might be useful for your Apache2 configuration:" |
68 |
+ /usr/share/${PN}/bin/icingacli setup config webserver apache --document-root /usr/share/${PN}/public |
69 |
+ fi |
70 |
+ if use nginx ; then |
71 |
+ einfo "The following might be useful for your NGinx configuration:" |
72 |
+ /usr/share/${PN}/bin/icingacli setup config webserver nginx --document-root /usr/share/${PN}/public |
73 |
+ fi |
74 |
+ fi |
75 |
+ einfo "All done." |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ mkdir -p "${D}/usr/share/${PN}" |
80 |
+ cp -R "${S}"/* "${D}/usr/share/${PN}" |
81 |
+ chmod -R a+rX "${D}/usr/share/${PN}/public" |
82 |
+} |
83 |
+ |
84 |
+pkg_postinst() { |
85 |
+ einfo "Run 'emerge --config =${CATEGORY}/${PF}' to finish setup." |
86 |
+} |