1 |
commit: 999b0b5b23047dac16c616f05d747286edd51f06 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 12 15:27:56 2017 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 12 15:27:56 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=999b0b5b |
7 |
|
8 |
net-analyzer/icinga2: 2.7.2 bup |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.4 |
11 |
|
12 |
net-analyzer/icinga2/Manifest | 1 + |
13 |
net-analyzer/icinga2/icinga2-2.7.2.ebuild | 182 ++++++++++++++++++++++++++++++ |
14 |
2 files changed, 183 insertions(+) |
15 |
|
16 |
diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest |
17 |
index c19fb18d6f1..090e7392568 100644 |
18 |
--- a/net-analyzer/icinga2/Manifest |
19 |
+++ b/net-analyzer/icinga2/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST icinga2-2.7.0.tar.gz 2435398 SHA256 8f06d23e5d922ba7a74f92dbb9af792be063d06d3aea9011aba39370935c6980 SHA512 470dd4ffa4ef608a018ede5c25b41f16213bf18c679eed8aaeed155fe6adc74a70abcc2e8be42ca20bf60f9b4b620c971ebbc96d608de2a90e480d72b93111bb WHIRLPOOL c926086c296affaafc7d55471ea5c1414b2d2cb8545657215a53bb9744c3147c32f8398317ad670e0d12fb95c83b54f0712f061e5e93bab868c4f04d833c3b47 |
22 |
DIST icinga2-2.7.1.tar.gz 2475348 SHA256 79f2cd2cba66b2d2a785d37cccd4a47611f7b0b7d52b9a625a22f0c7ff12f7f0 SHA512 8233c33b7191706569a236d583fff689b35eba750fca01a06cfd14ef636b01314b6b142d78777987bd08a9df1cc53f42652fd1c900532b73f0a0363aa220c6cd WHIRLPOOL be07801033b8e10d3a4aaa26e9cd6b75663aed4cf513f8d592b05ea13e0626ab3021d5a52ebeedfa754752057a1d3378fd54c1f8fd1ec5dc72338c891d6b9785 |
23 |
+DIST icinga2-2.7.2.tar.gz 2471098 SHA256 7e9691ad3389f04a53042d88c1ac8a37e2c9aaf8287856cad3fa48825adaee84 SHA512 69cd7c56eaae832712723fcd21e2177b8180b3975bcf773223ca52d3817d1ca538cfd620002bd7a9ccf2e89deffa80d07e6281111146295b21377de99170302d WHIRLPOOL 55e55189b9a1f6646cb94748a7b22731cd5f0d576a858737530187bbab83f40c8973f1a9f508449b0dcb997af443e75a15c9b2ef775c8fe95d1740c72db214c9 |
24 |
|
25 |
diff --git a/net-analyzer/icinga2/icinga2-2.7.2.ebuild b/net-analyzer/icinga2/icinga2-2.7.2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..2f4dc84145d |
28 |
--- /dev/null |
29 |
+++ b/net-analyzer/icinga2/icinga2-2.7.2.ebuild |
30 |
@@ -0,0 +1,182 @@ |
31 |
+# Copyright 1999-2017 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+if [[ ${PV} != 9999 ]]; then |
36 |
+ inherit cmake-utils depend.apache eutils systemd toolchain-funcs user wxwidgets |
37 |
+ SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
38 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
39 |
+else |
40 |
+ inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs user wxwidgets |
41 |
+ EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" |
42 |
+ EGIT_BRANCH="master" |
43 |
+ KEYWORDS="~ppc ~ppc64" |
44 |
+fi |
45 |
+ |
46 |
+DESCRIPTION="Distributed, general purpose, network monitoring engine" |
47 |
+HOMEPAGE="http://icinga.org/icinga2" |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+SLOT="0" |
51 |
+IUSE="+mysql postgres classicui console libressl lto mail minimal nano-syntax +plugins studio +vim-syntax" |
52 |
+WX_GTK_VER="3.0" |
53 |
+ |
54 |
+CDEPEND=" |
55 |
+ !libressl? ( dev-libs/openssl:0= ) |
56 |
+ libressl? ( dev-libs/libressl:0= ) |
57 |
+ >=dev-libs/boost-1.58-r1 |
58 |
+ console? ( dev-libs/libedit ) |
59 |
+ mysql? ( virtual/mysql ) |
60 |
+ postgres? ( dev-db/postgresql:= )" |
61 |
+ |
62 |
+DEPEND=" |
63 |
+ ${CDEPEND} |
64 |
+ sys-devel/bison |
65 |
+ >=sys-devel/flex-2.5.35" |
66 |
+ |
67 |
+RDEPEND=" |
68 |
+ ${CDEPEND} |
69 |
+ plugins? ( || ( |
70 |
+ net-analyzer/monitoring-plugins |
71 |
+ net-analyzer/nagios-plugins |
72 |
+ ) ) |
73 |
+ mail? ( virtual/mailx ) |
74 |
+ classicui? ( net-analyzer/icinga[web] ) |
75 |
+ studio? ( x11-libs/wxGTK:3.0 )" |
76 |
+ |
77 |
+REQUIRED_USE="!minimal? ( || ( mysql postgres ) )" |
78 |
+ |
79 |
+PATCHES=( |
80 |
+ "${FILESDIR}/fix-missing-include-2.7.1.patch" |
81 |
+ "${FILESDIR}/fix-missing-include-2.7.1-2.patch" |
82 |
+) |
83 |
+ |
84 |
+want_apache2 |
85 |
+ |
86 |
+pkg_setup() { |
87 |
+ depend.apache_pkg_setup |
88 |
+ if use studio ; then |
89 |
+ setup-wxwidgets |
90 |
+ fi |
91 |
+ enewgroup icinga |
92 |
+ enewgroup icingacmd |
93 |
+ enewgroup nagios # for plugins |
94 |
+ enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios" |
95 |
+} |
96 |
+ |
97 |
+src_configure() { |
98 |
+ sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die |
99 |
+ local mycmakeargs=( |
100 |
+ -DICINGA2_UNITY_BUILD=FALSE |
101 |
+ -DCMAKE_VERBOSE_MAKEFILE=ON |
102 |
+ -DCMAKE_BUILD_TYPE=None |
103 |
+ -DCMAKE_INSTALL_PREFIX=/usr |
104 |
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc |
105 |
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var |
106 |
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 |
107 |
+ -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins" |
108 |
+ -DICINGA2_USER=icinga |
109 |
+ -DICINGA2_GROUP=icingacmd |
110 |
+ -DICINGA2_COMMAND_USER=icinga |
111 |
+ -DICINGA2_COMMAND_GROUP=icingacmd |
112 |
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes |
113 |
+ -DLOGROTATE_HAS_SU=ON |
114 |
+ ) |
115 |
+ # default to off if minimal, allow the flags to be set otherwise |
116 |
+ if use minimal; then |
117 |
+ mycmakeargs+=( |
118 |
+ -DICINGA2_WITH_MYSQL=OFF |
119 |
+ -DICINGA2_WITH_PGSQL=OFF |
120 |
+ ) |
121 |
+ else |
122 |
+ mycmakeargs+=( |
123 |
+ -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF) |
124 |
+ -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF) |
125 |
+ ) |
126 |
+ fi |
127 |
+ # LTO |
128 |
+ if use lto; then |
129 |
+ mycmakeargs+=( |
130 |
+ -DICINGA2_LTO_BUILD=ON |
131 |
+ ) |
132 |
+ else |
133 |
+ mycmakeargs+=( |
134 |
+ -DICINGA2_LTO_BUILD=OFF |
135 |
+ ) |
136 |
+ fi |
137 |
+ # STUDIO |
138 |
+ if use studio; then |
139 |
+ mycmakeargs+=( |
140 |
+ -DICINGA2_WITH_STUDIO=ON |
141 |
+ ) |
142 |
+ else |
143 |
+ mycmakeargs+=( |
144 |
+ -DICINGA2_WITH_STUDIO=OFF |
145 |
+ ) |
146 |
+ fi |
147 |
+ |
148 |
+ cmake-utils_src_configure |
149 |
+} |
150 |
+ |
151 |
+src_install() { |
152 |
+ BUILDDIR="${WORKDIR}"/icinga2-${PV}_build |
153 |
+ cd "${BUILDDIR}" || die |
154 |
+ |
155 |
+ emake DESTDIR="${D}" install |
156 |
+ |
157 |
+ einstalldocs |
158 |
+ |
159 |
+ newinitd "${FILESDIR}"/icinga2.initd icinga2 |
160 |
+ |
161 |
+ if use mysql ; then |
162 |
+ docinto schema |
163 |
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql |
164 |
+ docinto schema/upgrade |
165 |
+ dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* |
166 |
+ elif use postgres ; then |
167 |
+ docinto schema |
168 |
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql |
169 |
+ docinto schema/upgrade |
170 |
+ dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/* |
171 |
+ fi |
172 |
+ |
173 |
+ keepdir /etc/icinga2 |
174 |
+ keepdir /var/lib/icinga2/api/zones |
175 |
+ keepdir /var/lib/icinga2/api/repository |
176 |
+ keepdir /var/lib/icinga2/api/log |
177 |
+ keepdir /var/spool/icinga2/perfdata |
178 |
+ |
179 |
+ rm -r "${D}/var/run" || die "failed to remove /var/run" |
180 |
+ rm -r "${D}/var/cache" || die "failed to remove /var/cache" |
181 |
+ |
182 |
+ fowners root:icinga /etc/icinga2 |
183 |
+ fperms 0750 /etc/icinga2 |
184 |
+ fowners icinga:icinga /var/lib/icinga2 |
185 |
+ fowners icinga:icinga /var/spool/icinga2 |
186 |
+ fowners -R icinga:icingacmd /var/lib/icinga2/api |
187 |
+ fowners icinga:icinga /var/spool/icinga2/perfdata |
188 |
+ fowners icinga:icingacmd /var/log/icinga2 |
189 |
+ |
190 |
+ fperms ug+rwX,o-rwx /etc/icinga2 |
191 |
+ fperms ug+rwX,o-rwx /var/lib/icinga2 |
192 |
+ fperms ug+rwX,o-rwx /var/spool/icinga2 |
193 |
+ fperms ug+rwX,o-rwx /var/log/icinga2 |
194 |
+ |
195 |
+ if use vim-syntax; then |
196 |
+ insinto /usr/share/vim/vimfiles |
197 |
+ doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect |
198 |
+ doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax |
199 |
+ fi |
200 |
+ |
201 |
+ if use nano-syntax; then |
202 |
+ insinto /usr/share/nano |
203 |
+ doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc |
204 |
+ fi |
205 |
+} |
206 |
+ |
207 |
+pkg_postinst() { |
208 |
+ if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then |
209 |
+ elog "DB IDO schema upgrade may be required required. |
210 |
+ http://docs.icinga.org/icinga2/snapshot/doc/module/icinga2/chapter/upgrading-icinga-2" |
211 |
+ fi |
212 |
+} |