Gentoo Archives: gentoo-commits

From: "Matt Thode (prometheanfire)" <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/icinga2: icinga2-2.2.4.ebuild ChangeLog
Date: Tue, 03 Mar 2015 19:22:54
Message-Id: 20150303192246.EFDF812F87@oystercatcher.gentoo.org
1 prometheanfire 15/03/03 19:22:46
2
3 Modified: ChangeLog
4 Added: icinga2-2.2.4.ebuild
5 Log:
6 bump of icinga2 and allowing monitoring-plugins to be used bug 541162
7
8 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0x33ED3FD25AFC78BA)
9
10 Revision Changes Path
11 1.24 net-analyzer/icinga2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/ChangeLog?rev=1.24&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/ChangeLog?rev=1.24&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/ChangeLog?r1=1.23&r2=1.24
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga2/ChangeLog,v
20 retrieving revision 1.23
21 retrieving revision 1.24
22 diff -u -r1.23 -r1.24
23 --- ChangeLog 14 Feb 2015 08:47:24 -0000 1.23
24 +++ ChangeLog 3 Mar 2015 19:22:46 -0000 1.24
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-analyzer/icinga2
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga2/ChangeLog,v 1.23 2015/02/14 08:47:24 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga2/ChangeLog,v 1.24 2015/03/03 19:22:46 prometheanfire Exp $
30 +
31 +*icinga2-2.2.4 (03 Mar 2015)
32 +
33 + 03 Mar 2015; Matthew Thode <prometheanfire@g.o> +icinga2-2.2.4.ebuild:
34 + bump of icinga2 and allowing monitoring-plugins to be used bug 541162
35
36 14 Feb 2015; Jeroen Roovers <jer@g.o> metadata.xml:
37 Remove short <longdescription>.
38
39
40
41 1.1 net-analyzer/icinga2/icinga2-2.2.4.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/icinga2-2.2.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/icinga2-2.2.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: icinga2-2.2.4.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga2/icinga2-2.2.4.ebuild,v 1.1 2015/03/03 19:22:46 prometheanfire Exp $
51
52 EAPI=5
53 inherit depend.apache eutils cmake-utils toolchain-funcs user versionator systemd
54
55 DESCRIPTION="Distributed, general purpose, network monitoring engine"
56 HOMEPAGE="http://icinga.org/icinga2"
57 #PV=$(replace_version_separator 3 '-')
58 SRC_URI="http://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
59 #S="${WORKDIR}/${PN}-${PV}"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~amd64 ~x86"
64 IUSE="+mysql postgres classicui nano-syntax +plugins +vim-syntax"
65
66 DEPEND="dev-util/cmake
67 dev-libs/openssl
68 >=dev-libs/boost-1.41
69 sys-devel/bison
70 >=sys-devel/flex-2.5.35
71 mysql? ( virtual/mysql )
72 postgres? ( dev-db/postgresql )"
73
74 RDEPEND="${DEPEND}
75 plugins? ( || (
76 net-analyzer/monitoring-plugins
77 net-analyzer/nagios-plugins
78 ) )
79 classicui? ( net-analyzer/icinga[web] )"
80
81 REQUIRED_USE="|| ( mysql postgres )"
82
83 want_apache2
84
85 pkg_setup() {
86 enewgroup icinga
87 enewgroup icingacmd
88 enewgroup nagios # for plugins
89 enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
90 }
91
92 src_prepare() {
93 # epatch "${FILESDIR}/${P}-create_var_cache.patch"
94 epatch_user
95 }
96
97 src_configure() {
98 local mycmakeargs=(
99 -DCMAKE_VERBOSE_MAKEFILE=ON
100 -DCMAKE_BUILD_TYPE=None
101 -DCMAKE_INSTALL_PREFIX=/usr
102 -DCMAKE_INSTALL_SYSCONFDIR=/etc
103 -DCMAKE_INSTALL_LOCALSTATEDIR=/var
104 -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
105 -DICINGA2_USER=icinga
106 -DICINGA2_GROUP=icingacmd
107 -DICINGA2_COMMAND_USER=icinga
108 -DICINGA2_COMMAND_GROUP=icingacmd
109 -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
110 )
111 if use postgres; then
112 mycmakeargs+=(
113 -DICINGA2_WITH_PGSQL=ON
114 )
115 else
116 mycmakeargs+=(
117 -DICINGA2_WITH_PGSQL=OFF
118 )
119 fi
120 if use mysql; then
121 mycmakeargs+=(
122 -DICINGA2_WITH_MYSQL=ON
123 )
124 else
125 mycmakeargs+=(
126 -DICINGA2_WITH_MYSQL=OFF
127 )
128 fi
129 cmake-utils_src_configure
130 }
131
132 src_install() {
133 BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
134 cd $BUILDDIR
135
136 #if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
137
138 emake DESTDIR="${D}" install
139 #fi
140
141 cd "${WORKDIR}"/icinga2-${PV}
142 if ! declare -p DOCS >/dev/null 2>&1 ; then
143 local d
144 for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
145 FAQ CREDITS CHANGELOG ; do
146 [[ -s "${d}" ]] && dodoc "${d}"
147 done
148 elif declare -p DOCS | grep -q "^declare -a " ; then
149 dodoc "${DOCS[@]}"
150 else
151 dodoc ${DOCS}
152 fi
153
154 newinitd "${FILESDIR}"/icinga2.initd icinga2
155 newconfd "${FILESDIR}"/icinga2.confd icinga2
156
157 if use mysql ; then
158 docinto schema
159 newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
160 docinto schema/upgrade
161 #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_mysql/schema/upgrade/0.0.11.sql mysql-upgrade-1.12.0.sql
162 elif use postgres ; then
163 docinto schema
164 newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
165 docinto schema/upgrade
166 #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_pgsql/schema/upgrade/0.0.11.sql pgsql-upgrade-1.12.0.sql
167 fi
168
169 keepdir /etc/icinga2
170 keepdir /var/lib/icinga2/api/zones
171 keepdir /var/lib/icinga2/api/repository
172 keepdir /var/lib/icinga2/api/log
173 keepdir /var/spool/icinga2/perfdata
174
175 rm -r "${D}var/run" || die "failed to remove /var/run"
176 rm -r "${D}var/cache" || die "failed to remove /var/cache"
177
178 fowners icinga:icinga /etc/icinga2
179 fowners icinga:icinga /var/lib/icinga2
180 fowners icinga:icinga /var/spool/icinga2
181 fowners icinga:icingacmd /var/log/icinga2
182
183 fperms ug+rwX,o-rwx /etc/icinga2
184 fperms ug+rwX,o-rwx /var/lib/icinga2
185 fperms ug+rwX,o-rwx /var/spool/icinga2
186 fperms ug+rwX,o-rwx /var/log/icinga2
187
188 if use vim-syntax; then
189 insinto /usr/share/vim/vimfiles
190 doins -r tools/syntax/vim/ftdetect
191 doins -r tools/syntax/vim/syntax
192 fi
193
194 if use nano-syntax; then
195 insinto /usr/share/nano
196 doins tools/syntax/nano/icinga2.nanorc
197 fi
198 }
199
200 pkg_postinst() {
201 elog "DB IDO schema upgrade required. http://docs.icinga.org/icinga2/snapshot/chapter-2.html#upgrading-the-mysql-database"
202 elog "You will need to update your configuration files, see https://dev.icinga.org/issues/5909"
203 }