Gentoo Archives: gentoo-commits

From: "Matthew Marlow (mattm)" <mattm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/zabbix: zabbix-2.2.8.ebuild zabbix-2.4.3.ebuild zabbix-2.0.14.ebuild ChangeLog
Date: Mon, 02 Feb 2015 19:29:21
Message-Id: 20150202192917.933E010EA0@oystercatcher.gentoo.org
1 mattm 15/02/02 19:29:17
2
3 Modified: ChangeLog
4 Added: zabbix-2.2.8.ebuild zabbix-2.4.3.ebuild
5 zabbix-2.0.14.ebuild
6 Log:
7 Bumping Zabbix 2.0.14, 2.2.8, and 2.4.3 to accomodate security bug 534606.
8
9 (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key )
10
11 Revision Changes Path
12 1.176 net-analyzer/zabbix/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.176&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?rev=1.176&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/ChangeLog?r1=1.175&r2=1.176
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v
21 retrieving revision 1.175
22 retrieving revision 1.176
23 diff -u -r1.175 -r1.176
24 --- ChangeLog 28 Dec 2014 16:12:30 -0000 1.175
25 +++ ChangeLog 2 Feb 2015 19:29:17 -0000 1.176
26 @@ -1,6 +1,14 @@
27 # ChangeLog for net-analyzer/zabbix
28 -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.175 2014/12/28 16:12:30 titanofold Exp $
30 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/ChangeLog,v 1.176 2015/02/02 19:29:17 mattm Exp $
32 +
33 +*zabbix-2.0.14 (02 Feb 2015)
34 +*zabbix-2.4.3 (02 Feb 2015)
35 +*zabbix-2.2.8 (02 Feb 2015)
36 +
37 + 02 Feb 2015; Matthew Marlowe <mattm@g.o> +zabbix-2.0.14.ebuild,
38 + +zabbix-2.2.8.ebuild, +zabbix-2.4.3.ebuild:
39 + Bumping Zabbix 2.0.14, 2.2.8, and 2.4.3 to accomodate security bug 534606.
40
41 28 Dec 2014; Aaron W. Swenson <titanofold@g.o>
42 zabbix-2.0.12-r1.ebuild, zabbix-2.0.13.ebuild, zabbix-2.2.5.ebuild,
43
44
45
46 1.1 net-analyzer/zabbix/zabbix-2.2.8.ebuild
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.8.ebuild?rev=1.1&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.8.ebuild?rev=1.1&content-type=text/plain
50
51 Index: zabbix-2.2.8.ebuild
52 ===================================================================
53 # Copyright 1999-2015 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.2.8.ebuild,v 1.1 2015/02/02 19:29:17 mattm Exp $
56
57 EAPI="5"
58
59 # needed to make webapp-config dep optional
60 WEBAPP_OPTIONAL="yes"
61 inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs
62
63 DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
64 HOMEPAGE="http://www.zabbix.com/"
65 MY_P=${P/_/}
66 MY_PV=${PV/_/}
67 SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
68 LICENSE="GPL-2"
69 SLOT="0"
70 WEBAPP_MANUAL_SLOT="yes"
71 KEYWORDS="~amd64 ~x86"
72 IUSE="agent java curl frontend ipv6 jabber ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
73
74 COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
75 ldap? (
76 net-nds/openldap
77 =dev-libs/cyrus-sasl-2*
78 net-libs/gnutls
79 )
80 mysql? ( >=virtual/mysql-5.0.3 )
81 sqlite? ( >=dev-db/sqlite-3.3.5 )
82 postgres? ( >=dev-db/postgresql-8.3.0 )
83 oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
84 jabber? ( dev-libs/iksemel )
85 libxml2? ( dev-libs/libxml2 )
86 curl? ( net-misc/curl )
87 openipmi? ( sys-libs/openipmi )
88 ssh? ( net-libs/libssh2 )
89 java? ( >=virtual/jdk-1.4 )
90 odbc? ( dev-db/unixODBC )"
91
92 RDEPEND="${COMMON_DEPEND}
93 proxy? ( <=net-analyzer/fping-2.9 )
94 server? ( <=net-analyzer/fping-2.9
95 app-admin/webapp-config )
96 java? (
97 >=virtual/jre-1.4
98 dev-java/slf4j-api
99 )
100 frontend? (
101 >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
102 || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
103 media-libs/gd[png]
104 app-admin/webapp-config )"
105 DEPEND="${COMMON_DEPEND}
106 virtual/pkgconfig"
107
108 S=${WORKDIR}/${MY_P}
109
110 ZABBIXJAVA_BASE="opt/zabbix_java"
111
112 java_prepare() {
113 cd "${S}/src/zabbix_java/lib"
114 rm -v *.jar || die
115
116 java-pkg_jar-from slf4j-api
117 }
118
119 src_prepare() {
120 eautoreconf
121 }
122
123 pkg_setup() {
124 if use server || use proxy ; then
125 local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
126 declare -i dbnum=0
127 for dbtype in ${dbtypes}; do
128 use ${dbtype} && let dbnum++
129 done
130 if [ ${dbnum} -gt 1 ]; then
131 eerror
132 eerror "You can't use more than one database type in Zabbix."
133 eerror "Select exactly one database type out of these: ${dbtypes}"
134 eerror
135 die "Multiple database types selected."
136 elif [ ${dbnum} -lt 1 ]; then
137 eerror
138 eerror "Select exactly one database type out of these: ${dbtypes}"
139 eerror
140 die "No database type selected."
141 fi
142 if use oracle; then
143 if [ -z "${ORACLE_HOME}" ]; then
144 eerror
145 eerror "The environment variable ORACLE_HOME must be set"
146 eerror "and point to the correct location."
147 eerror "It looks like you don't have Oracle installed."
148 eerror
149 die "Environment variable ORACLE_HOME is not set"
150 fi
151 if has_version 'dev-db/oracle-instantclient-basic'; then
152 ewarn
153 ewarn "Please ensure you have a full install of the Oracle client."
154 ewarn "dev-db/oracle-instantclient* is NOT sufficient."
155 ewarn
156 fi
157 fi
158 fi
159
160 if use frontend; then
161 webapp_pkg_setup
162 fi
163
164 enewgroup zabbix
165 enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
166 }
167
168 pkg_postinst() {
169 if use server || use proxy ; then
170 elog
171 elog "You may need to configure your database for Zabbix,"
172 elog "if you have not already done so. "
173 elog
174
175 zabbix_homedir=$(egethome zabbix)
176 if [ -n "${zabbix_homedir}" ] && \
177 [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
178 ewarn
179 ewarn "The user 'zabbix' should have his homedir changed"
180 ewarn "to /var/lib/zabbix/home if you want to use"
181 ewarn "custom alert scripts."
182 ewarn
183 ewarn "A real homedir might be needed for configfiles"
184 ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
185 ewarn "using sendxmpp for Jabber alerts)."
186 ewarn
187 ewarn "To change the homedir use:"
188 ewarn " usermod -d /var/lib/zabbix/home zabbix"
189 ewarn
190 fi
191 fi
192
193 if use server; then
194 elog
195 elog "For distributed monitoring you have to run:"
196 elog
197 elog "zabbix_server -n <nodeid>"
198 elog
199 elog "This will convert database data for use with Node ID"
200 elog "and also adds a local node."
201 elog
202 fi
203
204 elog "--"
205 elog
206 elog "You may need to add these lines to /etc/services:"
207 elog
208 elog "zabbix-agent 10050/tcp Zabbix Agent"
209 elog "zabbix-agent 10050/udp Zabbix Agent"
210 elog "zabbix-trapper 10051/tcp Zabbix Trapper"
211 elog "zabbix-trapper 10051/udp Zabbix Trapper"
212 elog
213
214 elog "Feel free to download or contribute gentoo specific zabbix templates"
215 elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)."
216
217 # repeat fowners/fperms functionality from src_install()
218 # here to catch wrong permissions on existing files in
219 # the live filesystem (yeah, that sucks).
220 chown -R zabbix:zabbix \
221 "${ROOT}"/etc/zabbix \
222 "${ROOT}"/var/lib/zabbix \
223 "${ROOT}"/var/lib/zabbix/home \
224 "${ROOT}"/var/lib/zabbix/scripts \
225 "${ROOT}"/var/log/zabbix
226 chmod 0750 \
227 "${ROOT}"/etc/zabbix \
228 "${ROOT}"/var/lib/zabbix \
229 "${ROOT}"/var/lib/zabbix/home \
230 "${ROOT}"/var/lib/zabbix/scripts \
231 "${ROOT}"/var/log/zabbix
232
233 chmod 0640 \
234 "${ROOT}"/etc/zabbix/zabbix_*
235
236 if use server || use proxy ; then
237 # check for fping
238 fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
239 case "${fping_perms}" in
240 4[157][157][157])
241 ;;
242 *)
243 ewarn
244 ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
245 ewarn "you have to make /usr/sbin/fping setuid root and executable"
246 ewarn "by everyone. Run the following command to fix it:"
247 ewarn
248 ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
249 ewarn
250 ewarn "Please be aware that this might impose a security risk,"
251 ewarn "depending on the code quality of fping."
252 ewarn
253 ;;
254 esac
255 fi
256 }
257
258 src_configure() {
259
260 econf \
261 $(use_enable server) \
262 $(use_enable proxy) \
263 $(use_enable agent) \
264 $(use_enable ipv6) \
265 $(use_enable static) \
266 $(use_enable java) \
267 $(use_with ldap) \
268 $(use_with snmp net-snmp) \
269 $(use_with mysql) \
270 $(use_with postgres postgresql) \
271 $(use_with oracle) \
272 $(use_with sqlite sqlite3) \
273 $(use_with jabber) \
274 $(use_with curl libcurl) \
275 $(use_with openipmi openipmi) \
276 $(use_with ssh ssh2) \
277 $(use_with libxml2) \
278 $(use_with odbc unixodbc) \
279 || die "econf failed"
280 }
281
282 src_install() {
283 dodir \
284 /etc/zabbix \
285 /var/lib/zabbix \
286 /var/lib/zabbix/home \
287 /var/lib/zabbix/scripts \
288 /var/lib/zabbix/alertscripts \
289 /var/lib/zabbix/externalscripts \
290 /var/log/zabbix
291
292 keepdir \
293 /etc/zabbix \
294 /var/lib/zabbix \
295 /var/lib/zabbix/home \
296 /var/lib/zabbix/scripts \
297 /var/lib/zabbix/alertscripts \
298 /var/lib/zabbix/externalscripts \
299 /var/log/zabbix
300
301 if use server; then
302 insinto /etc/zabbix
303 doins "${FILESDIR}/2.2"/zabbix_server.conf
304 doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
305 dosbin src/zabbix_server/zabbix_server
306 fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
307 fperms 0640 /etc/zabbix/zabbix_server.conf
308 dodir /usr/share/zabbix
309 /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
310 systemd_dounit "${FILESDIR}/zabbix-server.service"
311 systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
312 fi
313
314 if use proxy; then
315 doinitd \
316 "${FILESDIR}/2.2"/init.d/zabbix-proxy
317 dosbin \
318 src/zabbix_proxy/zabbix_proxy
319 insinto /etc/zabbix
320 doins \
321 "${FILESDIR}/2.2"/zabbix_proxy.conf
322 dodir /usr/share/zabbix
323 /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
324 systemd_dounit "${FILESDIR}/zabbix-proxy.service"
325 systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
326 fi
327
328 if use agent; then
329 insinto /etc/zabbix
330 doins \
331 "${FILESDIR}/2.2"/zabbix_agent.conf \
332 "${FILESDIR}/2.2"/zabbix_agentd.conf
333 doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
334 dosbin \
335 src/zabbix_agent/zabbix_agent \
336 src/zabbix_agent/zabbix_agentd
337 dobin \
338 src/zabbix_sender/zabbix_sender \
339 src/zabbix_get/zabbix_get
340 fowners zabbix:zabbix \
341 /etc/zabbix/zabbix_agent.conf \
342 /etc/zabbix/zabbix_agentd.conf
343 fperms 0640 \
344 /etc/zabbix/zabbix_agent.conf \
345 /etc/zabbix/zabbix_agentd.conf
346 systemd_dounit "${FILESDIR}/zabbix-agentd.service"
347 systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
348 fi
349
350 fowners zabbix:zabbix \
351 /etc/zabbix \
352 /var/lib/zabbix \
353 /var/lib/zabbix/home \
354 /var/lib/zabbix/scripts \
355 /var/lib/zabbix/alertscripts \
356 /var/lib/zabbix/externalscripts \
357 /var/log/zabbix
358 fperms 0750 \
359 /etc/zabbix \
360 /var/lib/zabbix \
361 /var/lib/zabbix/home \
362 /var/lib/zabbix/scripts \
363 /var/lib/zabbix/alertscripts \
364 /var/lib/zabbix/externalscripts \
365 /var/log/zabbix
366
367 dodoc README INSTALL NEWS ChangeLog \
368 conf/zabbix_agent.conf \
369 conf/zabbix_agentd.conf \
370 conf/zabbix_proxy.conf \
371 conf/zabbix_agentd/userparameter_examples.conf \
372 conf/zabbix_agentd/userparameter_mysql.conf \
373 conf/zabbix_server.conf
374
375 if use frontend; then
376 webapp_src_preinst
377 cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
378 webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
379 webapp_configfile \
380 "${MY_HTDOCSDIR}"/include/db.inc.php \
381 "${MY_HTDOCSDIR}"/include/config.inc.php
382 webapp_src_install
383 fi
384
385 if use java; then
386 dodir \
387 /${ZABBIXJAVA_BASE} \
388 /${ZABBIXJAVA_BASE}/bin \
389 /${ZABBIXJAVA_BASE}/lib
390 keepdir /${ZABBIXJAVA_BASE}
391 exeinto /${ZABBIXJAVA_BASE}/bin
392 doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
393 exeinto /${ZABBIXJAVA_BASE}/lib
394 doexe \
395 src/zabbix_java/lib/logback-classic-0.9.27.jar \
396 src/zabbix_java/lib/logback-console.xml \
397 src/zabbix_java/lib/logback-core-0.9.27.jar \
398 src/zabbix_java/lib/logback.xml \
399 src/zabbix_java/lib/android-json-4.3_r3.1.jar \
400 src/zabbix_java/lib/slf4j-api-1.6.1.jar
401 exeinto /${ZABBIXJAVA_BASE}/
402 doexe \
403 src/zabbix_java/settings.sh \
404 src/zabbix_java/startup.sh \
405 src/zabbix_java/shutdown.sh
406 fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
407 fi
408
409 }
410
411 src_compile() {
412 if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
413 emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
414 fi
415 }
416
417
418
419 1.1 net-analyzer/zabbix/zabbix-2.4.3.ebuild
420
421 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.4.3.ebuild?rev=1.1&view=markup
422 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.4.3.ebuild?rev=1.1&content-type=text/plain
423
424 Index: zabbix-2.4.3.ebuild
425 ===================================================================
426 # Copyright 1999-2015 Gentoo Foundation
427 # Distributed under the terms of the GNU General Public License v2
428 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.4.3.ebuild,v 1.1 2015/02/02 19:29:17 mattm Exp $
429
430 EAPI="5"
431
432 # needed to make webapp-config dep optional
433 WEBAPP_OPTIONAL="yes"
434 inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs
435
436 DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
437 HOMEPAGE="http://www.zabbix.com/"
438 MY_P=${P/_/}
439 MY_PV=${PV/_/}
440 SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
441 LICENSE="GPL-2"
442 SLOT="0"
443 WEBAPP_MANUAL_SLOT="yes"
444 KEYWORDS=""
445 IUSE="agent java curl frontend ipv6 jabber ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
446
447 COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
448 ldap? (
449 net-nds/openldap
450 =dev-libs/cyrus-sasl-2*
451 net-libs/gnutls
452 )
453 mysql? ( >=virtual/mysql-5.0.3 )
454 sqlite? ( >=dev-db/sqlite-3.3.5 )
455 postgres? ( >=dev-db/postgresql-8.3.0 )
456 oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
457 jabber? ( dev-libs/iksemel )
458 libxml2? ( dev-libs/libxml2 )
459 curl? ( net-misc/curl )
460 openipmi? ( sys-libs/openipmi )
461 ssh? ( net-libs/libssh2 )
462 java? ( >=virtual/jdk-1.4 )
463 odbc? ( dev-db/unixODBC )"
464
465 RDEPEND="${COMMON_DEPEND}
466 proxy? ( <=net-analyzer/fping-2.9 )
467 server? ( <=net-analyzer/fping-2.9
468 app-admin/webapp-config )
469 java? (
470 >=virtual/jre-1.6
471 dev-java/slf4j-api
472 )
473 frontend? (
474 >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
475 || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
476 media-libs/gd[png]
477 app-admin/webapp-config )"
478 DEPEND="${COMMON_DEPEND}
479 virtual/pkgconfig"
480
481 S=${WORKDIR}/${MY_P}
482
483 ZABBIXJAVA_BASE="opt/zabbix_java"
484
485 java_prepare() {
486 cd "${S}/src/zabbix_java/lib"
487 rm -v *.jar || die
488
489 java-pkg_jar-from slf4j-api
490 }
491
492 src_prepare() {
493 eautoreconf
494 }
495
496 pkg_setup() {
497 if use server || use proxy ; then
498 local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
499 declare -i dbnum=0
500 for dbtype in ${dbtypes}; do
501 use ${dbtype} && let dbnum++
502 done
503 if [ ${dbnum} -gt 1 ]; then
504 eerror
505 eerror "You can't use more than one database type in Zabbix."
506 eerror "Select exactly one database type out of these: ${dbtypes}"
507 eerror
508 die "Multiple database types selected."
509 elif [ ${dbnum} -lt 1 ]; then
510 eerror
511 eerror "Select exactly one database type out of these: ${dbtypes}"
512 eerror
513 die "No database type selected."
514 fi
515 if use oracle; then
516 if [ -z "${ORACLE_HOME}" ]; then
517 eerror
518 eerror "The environment variable ORACLE_HOME must be set"
519 eerror "and point to the correct location."
520 eerror "It looks like you don't have Oracle installed."
521 eerror
522 die "Environment variable ORACLE_HOME is not set"
523 fi
524 if has_version 'dev-db/oracle-instantclient-basic'; then
525 ewarn
526 ewarn "Please ensure you have a full install of the Oracle client."
527 ewarn "dev-db/oracle-instantclient* is NOT sufficient."
528 ewarn
529 fi
530 fi
531 fi
532
533 if use frontend; then
534 webapp_pkg_setup
535 fi
536
537 enewgroup zabbix
538 enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
539 }
540
541 pkg_postinst() {
542 if use server || use proxy ; then
543 elog
544 elog "You may need to configure your database for Zabbix,"
545 elog "if you have not already done so. "
546 elog
547
548 zabbix_homedir=$(egethome zabbix)
549 if [ -n "${zabbix_homedir}" ] && \
550 [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
551 ewarn
552 ewarn "The user 'zabbix' should have his homedir changed"
553 ewarn "to /var/lib/zabbix/home if you want to use"
554 ewarn "custom alert scripts."
555 ewarn
556 ewarn "A real homedir might be needed for configfiles"
557 ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
558 ewarn "using sendxmpp for Jabber alerts)."
559 ewarn
560 ewarn "To change the homedir use:"
561 ewarn " usermod -d /var/lib/zabbix/home zabbix"
562 ewarn
563 fi
564 fi
565
566 if use server; then
567 elog
568 elog "For distributed monitoring you have to run:"
569 elog
570 elog "zabbix_server -n <nodeid>"
571 elog
572 elog "This will convert database data for use with Node ID"
573 elog "and also adds a local node."
574 elog
575 fi
576
577 elog "--"
578 elog
579 elog "You may need to add these lines to /etc/services:"
580 elog
581 elog "zabbix-agent 10050/tcp Zabbix Agent"
582 elog "zabbix-agent 10050/udp Zabbix Agent"
583 elog "zabbix-trapper 10051/tcp Zabbix Trapper"
584 elog "zabbix-trapper 10051/udp Zabbix Trapper"
585 elog
586
587 elog "Feel free to download or contribute gentoo specific zabbix templates"
588 elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)."
589
590 # repeat fowners/fperms functionality from src_install()
591 # here to catch wrong permissions on existing files in
592 # the live filesystem (yeah, that sucks).
593 chown -R zabbix:zabbix \
594 "${ROOT}"/etc/zabbix \
595 "${ROOT}"/var/lib/zabbix \
596 "${ROOT}"/var/lib/zabbix/home \
597 "${ROOT}"/var/lib/zabbix/scripts \
598 "${ROOT}"/var/log/zabbix
599 chmod 0750 \
600 "${ROOT}"/etc/zabbix \
601 "${ROOT}"/var/lib/zabbix \
602 "${ROOT}"/var/lib/zabbix/home \
603 "${ROOT}"/var/lib/zabbix/scripts \
604 "${ROOT}"/var/log/zabbix
605
606 chmod 0640 \
607 "${ROOT}"/etc/zabbix/zabbix_*
608
609 if use server || use proxy ; then
610 # check for fping
611 fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
612 case "${fping_perms}" in
613 4[157][157][157])
614 ;;
615 *)
616 ewarn
617 ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
618 ewarn "you have to make /usr/sbin/fping setuid root and executable"
619 ewarn "by everyone. Run the following command to fix it:"
620 ewarn
621 ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
622 ewarn
623 ewarn "Please be aware that this might impose a security risk,"
624 ewarn "depending on the code quality of fping."
625 ewarn
626 ;;
627 esac
628 fi
629 }
630
631 src_configure() {
632
633 econf \
634 $(use_enable server) \
635 $(use_enable proxy) \
636 $(use_enable agent) \
637 $(use_enable ipv6) \
638 $(use_enable static) \
639 $(use_enable java) \
640 $(use_with ldap) \
641 $(use_with snmp net-snmp) \
642 $(use_with mysql) \
643 $(use_with postgres postgresql) \
644 $(use_with oracle) \
645 $(use_with sqlite sqlite3) \
646 $(use_with jabber) \
647 $(use_with curl libcurl) \
648 $(use_with openipmi openipmi) \
649 $(use_with ssh ssh2) \
650 $(use_with libxml2) \
651 $(use_with odbc unixodbc) \
652 || die "econf failed"
653 }
654
655 src_install() {
656 dodir \
657 /etc/zabbix \
658 /var/lib/zabbix \
659 /var/lib/zabbix/home \
660 /var/lib/zabbix/scripts \
661 /var/lib/zabbix/alertscripts \
662 /var/lib/zabbix/externalscripts \
663 /var/log/zabbix
664
665 keepdir \
666 /etc/zabbix \
667 /var/lib/zabbix \
668 /var/lib/zabbix/home \
669 /var/lib/zabbix/scripts \
670 /var/lib/zabbix/alertscripts \
671 /var/lib/zabbix/externalscripts \
672 /var/log/zabbix
673
674 if use server; then
675 insinto /etc/zabbix
676 doins "${FILESDIR}/2.4"/zabbix_server.conf
677 doinitd "${FILESDIR}/2.4"/init.d/zabbix-server
678 dosbin src/zabbix_server/zabbix_server
679 fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
680 fperms 0640 /etc/zabbix/zabbix_server.conf
681 dodir /usr/share/zabbix
682 /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
683 systemd_dounit "${FILESDIR}/zabbix-server.service"
684 systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
685 fi
686
687 if use proxy; then
688 doinitd \
689 "${FILESDIR}/2.4"/init.d/zabbix-proxy
690 dosbin \
691 src/zabbix_proxy/zabbix_proxy
692 insinto /etc/zabbix
693 doins \
694 "${FILESDIR}/2.4"/zabbix_proxy.conf
695 dodir /usr/share/zabbix
696 /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
697 systemd_dounit "${FILESDIR}/zabbix-proxy.service"
698 systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
699 fi
700
701 if use agent; then
702 insinto /etc/zabbix
703 doins \
704 "${FILESDIR}/2.4"/zabbix_agent.conf \
705 "${FILESDIR}/2.4"/zabbix_agentd.conf
706 doinitd "${FILESDIR}/2.4"/init.d/zabbix-agentd
707 dosbin \
708 src/zabbix_agent/zabbix_agent \
709 src/zabbix_agent/zabbix_agentd
710 dobin \
711 src/zabbix_sender/zabbix_sender \
712 src/zabbix_get/zabbix_get
713 fowners zabbix:zabbix \
714 /etc/zabbix/zabbix_agent.conf \
715 /etc/zabbix/zabbix_agentd.conf
716 fperms 0640 \
717 /etc/zabbix/zabbix_agent.conf \
718 /etc/zabbix/zabbix_agentd.conf
719 systemd_dounit "${FILESDIR}/zabbix-agentd.service"
720 systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
721 fi
722
723 fowners zabbix:zabbix \
724 /etc/zabbix \
725 /var/lib/zabbix \
726 /var/lib/zabbix/home \
727 /var/lib/zabbix/scripts \
728 /var/lib/zabbix/alertscripts \
729 /var/lib/zabbix/externalscripts \
730 /var/log/zabbix
731 fperms 0750 \
732 /etc/zabbix \
733 /var/lib/zabbix \
734 /var/lib/zabbix/home \
735 /var/lib/zabbix/scripts \
736 /var/lib/zabbix/alertscripts \
737 /var/lib/zabbix/externalscripts \
738 /var/log/zabbix
739
740 dodoc README INSTALL NEWS ChangeLog \
741 conf/zabbix_agent.conf \
742 conf/zabbix_agentd.conf \
743 conf/zabbix_proxy.conf \
744 conf/zabbix_agentd/userparameter_examples.conf \
745 conf/zabbix_agentd/userparameter_mysql.conf \
746 conf/zabbix_server.conf
747
748 if use frontend; then
749 webapp_src_preinst
750 cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
751 webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
752 webapp_configfile \
753 "${MY_HTDOCSDIR}"/include/db.inc.php \
754 "${MY_HTDOCSDIR}"/include/config.inc.php
755 webapp_src_install
756 fi
757
758 if use java; then
759 dodir \
760 /${ZABBIXJAVA_BASE} \
761 /${ZABBIXJAVA_BASE}/bin \
762 /${ZABBIXJAVA_BASE}/lib
763 keepdir /${ZABBIXJAVA_BASE}
764 exeinto /${ZABBIXJAVA_BASE}/bin
765 doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
766 exeinto /${ZABBIXJAVA_BASE}/lib
767 doexe \
768 src/zabbix_java/lib/logback-classic-0.9.27.jar \
769 src/zabbix_java/lib/logback-console.xml \
770 src/zabbix_java/lib/logback-core-0.9.27.jar \
771 src/zabbix_java/lib/logback.xml \
772 src/zabbix_java/lib/android-json-4.3_r3.1.jar \
773 src/zabbix_java/lib/slf4j-api-1.6.1.jar
774 exeinto /${ZABBIXJAVA_BASE}/
775 doexe \
776 src/zabbix_java/settings.sh \
777 src/zabbix_java/startup.sh \
778 src/zabbix_java/shutdown.sh
779 fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
780 fi
781
782 }
783
784 src_compile() {
785 if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
786 emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
787 fi
788 }
789
790
791
792 1.1 net-analyzer/zabbix/zabbix-2.0.14.ebuild
793
794 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.14.ebuild?rev=1.1&view=markup
795 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.14.ebuild?rev=1.1&content-type=text/plain
796
797 Index: zabbix-2.0.14.ebuild
798 ===================================================================
799 # Copyright 1999-2015 Gentoo Foundation
800 # Distributed under the terms of the GNU General Public License v2
801 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/zabbix-2.0.14.ebuild,v 1.1 2015/02/02 19:29:17 mattm Exp $
802
803 EAPI="5"
804
805 # needed to make webapp-config dep optional
806 WEBAPP_OPTIONAL="yes"
807 inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user toolchain-funcs
808
809 DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
810 HOMEPAGE="http://www.zabbix.com/"
811 MY_P=${P/_/}
812 MY_PV=${PV/_/}
813 SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
814 LICENSE="GPL-2"
815 SLOT="0"
816 WEBAPP_MANUAL_SLOT="yes"
817 KEYWORDS="~amd64 ~x86"
818 IUSE="agent java curl frontend ipv6 jabber ldap mysql openipmi oracle postgres proxy server ssh snmp sqlite iodbc odbc static"
819
820 COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
821 ldap? (
822 net-nds/openldap
823 =dev-libs/cyrus-sasl-2*
824 net-libs/gnutls
825 )
826 mysql? ( >=virtual/mysql-5.0 )
827 sqlite? ( >=dev-db/sqlite-3.3.5 )
828 postgres? ( >=dev-db/postgresql-8.3.0 )
829 oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
830 jabber? ( dev-libs/iksemel )
831 curl? ( net-misc/curl )
832 openipmi? ( sys-libs/openipmi )
833 ssh? ( net-libs/libssh2 )
834 java? ( >=virtual/jdk-1.4 )
835 odbc? (
836 iodbc? ( dev-db/libiodbc )
837 !iodbc? ( dev-db/unixODBC )
838 )"
839
840 RDEPEND="${COMMON_DEPEND}
841 proxy? ( <=net-analyzer/fping-2.9 )
842 server? ( <=net-analyzer/fping-2.9
843 app-admin/webapp-config )
844 java? (
845 >=virtual/jre-1.4
846 dev-java/slf4j-api
847 dev-java/json-simple
848 )
849 frontend? (
850 dev-lang/php[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
851 || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
852 media-libs/gd[png]
853 app-admin/webapp-config )"
854 DEPEND="${COMMON_DEPEND}
855 virtual/pkgconfig"
856
857 S=${WORKDIR}/${MY_P}
858
859 ZABBIXJAVA_BASE="opt/zabbix_java"
860
861 java_prepare() {
862 cd "${S}/src/zabbix_java/lib"
863 rm -v *.jar || die
864
865 java-pkg_jar-from slf4j-api
866 java-pkg_jar-from json-simple
867 }
868
869 src_prepare() {
870 epatch "${FILESDIR}/2.0/patches/zbx282.patch"
871 eautoreconf
872 }
873
874 pkg_setup() {
875 if use server || use proxy ; then
876 local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
877 declare -i dbnum=0
878 for dbtype in ${dbtypes}; do
879 use ${dbtype} && let dbnum++
880 done
881 if [ ${dbnum} -gt 1 ]; then
882 eerror
883 eerror "You can't use more than one database type in Zabbix."
884 eerror "Select exactly one database type out of these: ${dbtypes}"
885 eerror
886 die "Multiple database types selected."
887 elif [ ${dbnum} -lt 1 ]; then
888 eerror
889 eerror "Select exactly one database type out of these: ${dbtypes}"
890 eerror
891 die "No database type selected."
892 fi
893 if use oracle; then
894 if [ -z "${ORACLE_HOME}" ]; then
895 eerror
896 eerror "The environment variable ORACLE_HOME must be set"
897 eerror "and point to the correct location."
898 eerror "It looks like you don't have Oracle installed."
899 eerror
900 die "Environment variable ORACLE_HOME is not set"
901 fi
902 if has_version 'dev-db/oracle-instantclient-basic'; then
903 ewarn
904 ewarn "Please ensure you have a full install of the Oracle client."
905 ewarn "dev-db/oracle-instantclient* is NOT sufficient."
906 ewarn
907 fi
908 fi
909 fi
910
911 if use frontend; then
912 webapp_pkg_setup
913 fi
914
915 enewgroup zabbix
916 enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
917 }
918
919 pkg_postinst() {
920 if use server || use proxy ; then
921 elog
922 elog "You may need to configure your database for Zabbix,"
923 elog "if you have not already done so. Most minor version"
924 elog "zabbix updates do not require db changes. However, "
925 elog "you should read the release notes to be sure."
926 elog
927 elog "Have a look at /usr/share/zabbix for"
928 elog "database creation and upgrades."
929 elog
930 elog "Execute schema, images, and data sql files in that order."
931 elog
932 elog "For more info read the Zabbix manual at"
933 elog "http://www.zabbix.com/documentation.php"
934 elog
935 elog "New use flags: java, odbc, iodbc"
936 elog
937
938 zabbix_homedir=$(egethome zabbix)
939 if [ -n "${zabbix_homedir}" ] && \
940 [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
941 ewarn
942 ewarn "The user 'zabbix' should have his homedir changed"
943 ewarn "to /var/lib/zabbix/home if you want to use"
944 ewarn "custom alert scripts."
945 ewarn
946 ewarn "A real homedir might be needed for configfiles"
947 ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
948 ewarn "using sendxmpp for Jabber alerts)."
949 ewarn
950 ewarn "To change the homedir use:"
951 ewarn " usermod -d /var/lib/zabbix/home zabbix"
952 ewarn
953 fi
954 fi
955
956 if use server; then
957 elog
958 elog "For distributed monitoring you have to run:"
959 elog
960 elog "zabbix_server -n <nodeid>"
961 elog
962 elog "This will convert database data for use with Node ID"
963 elog "and also adds a local node."
964 elog
965 fi
966
967 elog "--"
968 elog
969 elog "You may need to add these lines to /etc/services:"
970 elog
971 elog "zabbix-agent 10050/tcp Zabbix Agent"
972 elog "zabbix-agent 10050/udp Zabbix Agent"
973 elog "zabbix-trapper 10051/tcp Zabbix Trapper"
974 elog "zabbix-trapper 10051/udp Zabbix Trapper"
975 elog
976
977 elog "Feel free to download or contribute gentoo specific zabbix templates"
978 elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)."
979
980 # repeat fowners/fperms functionality from src_install()
981 # here to catch wrong permissions on existing files in
982 # the live filesystem (yeah, that sucks).
983 chown -R zabbix:zabbix \
984 "${ROOT}"/etc/zabbix \
985 "${ROOT}"/var/lib/zabbix \
986 "${ROOT}"/var/lib/zabbix/home \
987 "${ROOT}"/var/lib/zabbix/scripts \
988 "${ROOT}"/var/log/zabbix
989 chmod 0750 \
990 "${ROOT}"/etc/zabbix \
991 "${ROOT}"/var/lib/zabbix \
992 "${ROOT}"/var/lib/zabbix/home \
993 "${ROOT}"/var/lib/zabbix/scripts \
994 "${ROOT}"/var/log/zabbix
995
996 chmod 0640 \
997 "${ROOT}"/etc/zabbix/zabbix_*
998
999 if use server || use proxy ; then
1000 # check for fping
1001 fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
1002 case "${fping_perms}" in
1003 4[157][157][157])
1004 ;;
1005 *)
1006 ewarn
1007 ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
1008 ewarn "you have to make /usr/sbin/fping setuid root and executable"
1009 ewarn "by everyone. Run the following command to fix it:"
1010 ewarn
1011 ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
1012 ewarn
1013 ewarn "Please be aware that this might impose a security risk,"
1014 ewarn "depending on the code quality of fping."
1015 ewarn
1016 ;;
1017 esac
1018 fi
1019 }
1020
1021 src_configure() {
1022
1023 local myconf
1024
1025 if use odbc && use iodbc ; then
1026 myconf="${myconf} --with-iodbc --without-unixodbc"
1027 elif use odbc && ! use iodbc; then
1028 myconf="${myconf} --with-unixodbc --without-iodbc"
1029 else
1030 myconf="${myconf} --without-unixodbc --without-iodbc"
1031 fi
1032
1033 econf \
1034 $myconf \
1035 $(use_enable server) \
1036 $(use_enable proxy) \
1037 $(use_enable agent) \
1038 $(use_enable ipv6) \
1039 $(use_enable static) \
1040 $(use_enable java) \
1041 $(use_with ldap) \
1042 $(use_with snmp net-snmp) \
1043 $(use_with mysql) \
1044 $(use_with postgres postgresql) \
1045 $(use_with oracle) \
1046 $(use_with sqlite sqlite3) \
1047 $(use_with jabber) \
1048 $(use_with curl libcurl) \
1049 $(use_with openipmi openipmi) \
1050 $(use_with ssh ssh2) \
1051 || die "econf failed"
1052 }
1053
1054 src_install() {
1055 dodir \
1056 /etc/zabbix \
1057 /var/lib/zabbix \
1058 /var/lib/zabbix/home \
1059 /var/lib/zabbix/scripts \
1060 /var/log/zabbix
1061
1062 keepdir \
1063 /etc/zabbix \
1064 /var/lib/zabbix \
1065 /var/lib/zabbix/home \
1066 /var/lib/zabbix/scripts \
1067 /var/log/zabbix
1068
1069 if use server; then
1070 insinto /etc/zabbix
1071 doins \
1072 "${FILESDIR}/1.6.6"/zabbix_server.conf \
1073 "${FILESDIR}/1.6.6"/zabbix_trapper.conf
1074 doinitd \
1075 "${FILESDIR}/2.0"/init.d/zabbix-server
1076 dosbin \
1077 src/zabbix_server/zabbix_server
1078 dodir \
1079 /usr/share/zabbix
1080 insinto /usr/share/zabbix
1081 doins -r \
1082 database \
1083 upgrades
1084 #remove unneeded files left over from wholesale copy (bug #433708)
1085 rm "${ED}"/usr/share/zabbix/{database,upgrades}/Makefile{,.in,.am}
1086 fowners zabbix:zabbix \
1087 /etc/zabbix/zabbix_server.conf \
1088 /etc/zabbix/zabbix_trapper.conf
1089 fperms 0640 \
1090 /etc/zabbix/zabbix_server.conf \
1091 /etc/zabbix/zabbix_trapper.conf
1092 fi
1093
1094 if use proxy; then
1095 doinitd \
1096 "${FILESDIR}/2.0"/init.d/zabbix-proxy
1097 dosbin \
1098 src/zabbix_proxy/zabbix_proxy
1099 insinto /etc/zabbix
1100 doins \
1101 "${FILESDIR}/2.0"/zabbix_proxy.conf
1102 dodir \
1103 /usr/share/zabbix
1104 insinto /usr/share/zabbix
1105 doins -r \
1106 database \
1107 upgrades
1108 fi
1109
1110 if use agent; then
1111 insinto /etc/zabbix
1112 doins \
1113 "${FILESDIR}/1.6.6"/zabbix_agent.conf \
1114 "${FILESDIR}/1.6.6"/zabbix_agentd.conf
1115 doinitd \
1116 "${FILESDIR}/2.0"/init.d/zabbix-agentd
1117 dosbin \
1118 src/zabbix_agent/zabbix_agent \
1119 src/zabbix_agent/zabbix_agentd
1120 dobin \
1121 src/zabbix_sender/zabbix_sender \
1122 src/zabbix_get/zabbix_get
1123 fowners zabbix:zabbix \
1124 /etc/zabbix/zabbix_agent.conf \
1125 /etc/zabbix/zabbix_agentd.conf
1126 fperms 0640 \
1127 /etc/zabbix/zabbix_agent.conf \
1128 /etc/zabbix/zabbix_agentd.conf
1129 fi
1130
1131 fowners zabbix:zabbix \
1132 /etc/zabbix \
1133 /var/lib/zabbix \
1134 /var/lib/zabbix/home \
1135 /var/lib/zabbix/scripts \
1136 /var/log/zabbix
1137 fperms 0750 \
1138 /etc/zabbix \
1139 /var/lib/zabbix \
1140 /var/lib/zabbix/home \
1141 /var/lib/zabbix/scripts \
1142 /var/log/zabbix
1143
1144 dodoc README INSTALL NEWS ChangeLog \
1145 conf/zabbix_agent.conf \
1146 conf/zabbix_agentd.conf \
1147 conf/zabbix_proxy.conf \
1148 conf/zabbix_agentd/userparameter_examples.conf \
1149 conf/zabbix_agentd/userparameter_mysql.conf \
1150 conf/zabbix_server.conf
1151
1152 if use frontend; then
1153 webapp_src_preinst
1154 cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
1155 webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
1156 webapp_configfile \
1157 "${MY_HTDOCSDIR}"/include/db.inc.php \
1158 "${MY_HTDOCSDIR}"/include/config.inc.php
1159 webapp_src_install
1160 fi
1161
1162 if use java; then
1163 dodir \
1164 /${ZABBIXJAVA_BASE} \
1165 /${ZABBIXJAVA_BASE}/bin \
1166 /${ZABBIXJAVA_BASE}/lib
1167 keepdir /${ZABBIXJAVA_BASE}
1168 exeinto /${ZABBIXJAVA_BASE}/bin
1169 doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
1170 exeinto /${ZABBIXJAVA_BASE}/lib
1171 doexe \
1172 src/zabbix_java/lib/logback-classic-0.9.27.jar \
1173 src/zabbix_java/lib/logback-console.xml \
1174 src/zabbix_java/lib/logback-core-0.9.27.jar \
1175 src/zabbix_java/lib/logback.xml \
1176 src/zabbix_java/lib/org-json-2010-12-28.jar \
1177 src/zabbix_java/lib/slf4j-api-1.6.1.jar
1178 exeinto /${ZABBIXJAVA_BASE}/
1179 doexe \
1180 src/zabbix_java/settings.sh \
1181 src/zabbix_java/startup.sh \
1182 src/zabbix_java/shutdown.sh
1183 fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
1184 fi
1185
1186 }
1187
1188 src_compile() {
1189 if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
1190 emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
1191 fi
1192 }