/[gentoo-x86]/sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild
Gentoo

Contents of /sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Aug 5 20:48:05 2015 UTC (4 years, 5 months ago) by jsbronder
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +5 -1 lines
sys-cluster/ganglia: run python_setup when python is enabled per mgorny

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 4D7043C9)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/ganglia/ganglia-3.7.1-r1.ebuild,v 1.1 2015/08/05 14:27:13 jsbronder Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 )
8 DISTUTILS_OPTIONAL=1
9
10 inherit distutils-r1 eutils multilib systemd
11
12 DESCRIPTION="A scalable distributed monitoring system for clusters and grids"
13 HOMEPAGE="http://ganglia.sourceforge.net/"
14 SRC_URI="mirror://sourceforge/ganglia/${P}.tar.gz"
15 LICENSE="BSD"
16
17 SLOT="0"
18 KEYWORDS="~amd64 ~ppc ~x86"
19 IUSE="minimal pcre python examples"
20
21 DEPEND="dev-libs/confuse
22 dev-libs/expat
23 >=dev-libs/apr-1.0
24 !dev-db/firebird
25 pcre? ( dev-libs/libpcre )
26 python? ( ${PYTHON_DEPS} )"
27
28 RDEPEND="
29 ${DEPEND}
30 !minimal? ( net-analyzer/rrdtool )"
31
32 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
33
34 src_prepare() {
35 if use python && ! use minimal; then
36 pushd gmetad-python >/dev/null || die
37 distutils-r1_src_prepare
38 popd >/dev/null || die
39 fi
40 }
41
42 src_configure() {
43 if use python; then
44 python_setup
45 fi
46
47 econf \
48 --with-systemdsystemunitdir=$(systemd_get_unitdir) \
49 --enable-gexec \
50 --sysconfdir="${EPREFIX}"/etc/${PN} \
51 --enable-static=no \
52 $(use_enable python) \
53 $(use_with pcre libpcre) \
54 $(use_with !minimal gmetad)
55 }
56
57 src_compile() {
58 default_src_compile
59
60 if use python && ! use minimal; then
61 pushd gmetad-python >/dev/null || die
62 distutils-r1_src_compile
63 popd >/dev/null || die
64 fi
65 }
66
67 src_install() {
68 local exdir=/usr/share/doc/${P}
69
70 emake DESTDIR="${D}" install || die
71
72 newinitd "${FILESDIR}"/gmond.rc-2 gmond
73 doman {mans/*.1,gmond/*.5} || die "Failed to install manpages"
74 dodoc AUTHORS INSTALL NEWS README || die
75
76 dodir /etc/ganglia/conf.d
77 use python && dodir /usr/$(get_libdir)/ganglia/python_modules
78 gmond/gmond -t > "${ED}"/etc/ganglia/gmond.conf
79
80 if use examples; then
81 insinto ${exdir}/cmod-examples
82 doins gmond/modules/example/*.c
83 if use python; then
84 # Installing as an examples per upstream.
85 insinto ${exdir}/pymod-examples
86 doins gmond/python_modules/*/*.py
87 insinto ${exdir}/pymod-examples/conf.d
88 doins gmond/python_modules/conf.d/*.pyconf
89 fi
90 fi
91
92 if ! use minimal; then
93 insinto /etc/ganglia
94 doins gmetad/gmetad.conf
95 doman mans/gmetad.1
96
97 newinitd "${FILESDIR}"/gmetad.rc-2 gmetad
98 keepdir /var/lib/ganglia/rrds
99 fowners nobody:nobody /var/lib/ganglia/rrds
100
101 if use python; then
102 pushd gmetad-python >/dev/null || die
103 distutils-r1_src_install
104 popd >/dev/null || die
105 newinitd "${FILESDIR}"/gmetad-python.rc gmetad-python
106 fi
107 fi
108 }
109
110 src_test() {
111 default_src_test
112
113 if use python && ! use minimal; then
114 pushd gmetad-python >/dev/null || die
115 distutils-r1_src_test
116 popd >/dev/null || die
117 fi
118 }
119
120 pkg_postinst() {
121 elog "A default configuration file for gmond has been generated"
122 elog "for you as a template by running:"
123 elog " /usr/sbin/gmond -t > /etc/ganglia/gmond.conf"
124
125 elog "The web frontend for Ganglia has been split off. Emerge"
126 elog "sys-cluster/ganglia-web if you need it."
127 }

  ViewVC Help
Powered by ViewVC 1.1.20