Lines 3-8
Link Here
|
3 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-4.10.3.ebuild,v 1.2 2011/03/30 20:30:37 dilfridge Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-4.10.3.ebuild,v 1.2 2011/03/30 20:30:37 dilfridge Exp $ |
4 |
|
4 |
|
5 |
EAPI=3 |
5 |
EAPI=3 |
|
|
6 |
GENTOO_DEPEND_ON_PERL=no # we depend on it only if use=perl |
6 |
|
7 |
|
7 |
inherit eutils base linux-info perl-app autotools |
8 |
inherit eutils base linux-info perl-app autotools |
8 |
|
9 |
|
Lines 12-19
SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
Link Here
|
12 |
|
13 |
|
13 |
LICENSE="GPL-2" |
14 |
LICENSE="GPL-2" |
14 |
SLOT="0" |
15 |
SLOT="0" |
15 |
KEYWORDS="~amd64 ~x86" |
16 |
KEYWORDS="~arm ~sparc ~amd64 ~x86" |
16 |
IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin" |
17 |
IUSE="static-libs contrib debug kernel_linux kernel_FreeBSD kernel_Darwin perl" |
17 |
|
18 |
|
18 |
# The plugin lists have to follow here since they extend IUSE |
19 |
# The plugin lists have to follow here since they extend IUSE |
19 |
|
20 |
|
Lines 71-76
COMMON_DEPEND="
Link Here
|
71 |
collectd_plugins_onewire? ( sys-fs/owfs ) |
72 |
collectd_plugins_onewire? ( sys-fs/owfs ) |
72 |
collectd_plugins_oracle? ( >=dev-db/oracle-instantclient-basic-11.2.0.1.0 ) |
73 |
collectd_plugins_oracle? ( >=dev-db/oracle-instantclient-basic-11.2.0.1.0 ) |
73 |
collectd_plugins_perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
74 |
collectd_plugins_perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
|
|
75 |
perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
74 |
collectd_plugins_ping? ( net-libs/liboping ) |
76 |
collectd_plugins_ping? ( net-libs/liboping ) |
75 |
collectd_plugins_postgresql? ( >=dev-db/postgresql-base-8.2 ) |
77 |
collectd_plugins_postgresql? ( >=dev-db/postgresql-base-8.2 ) |
76 |
collectd_plugins_python? ( =dev-lang/python-2* ) |
78 |
collectd_plugins_python? ( =dev-lang/python-2* ) |
Lines 102-107
RDEPEND="${COMMON_DEPEND}
Link Here
|
102 |
PATCHES=( |
104 |
PATCHES=( |
103 |
"${FILESDIR}/${PN}-4.10.1"-{libperl,libiptc,noowniptc}.patch |
105 |
"${FILESDIR}/${PN}-4.10.1"-{libperl,libiptc,noowniptc}.patch |
104 |
"${FILESDIR}/${PN}-4.10.2"-{libocci,libnotify-0.7,nohal}.patch |
106 |
"${FILESDIR}/${PN}-4.10.2"-{libocci,libnotify-0.7,nohal}.patch |
|
|
107 |
"${FILESDIR}/${PN}-4.10.2"-bind-time-fix.patch |
105 |
) |
108 |
) |
106 |
|
109 |
|
107 |
# @FUNCTION: collectd_plugin_kernel_linux |
110 |
# @FUNCTION: collectd_plugin_kernel_linux |
Lines 184-189
pkg_setup() {
Link Here
|
184 |
fi |
187 |
fi |
185 |
|
188 |
|
186 |
enewgroup collectd |
189 |
enewgroup collectd |
|
|
190 |
enewuser collectd 85 -1 /var/lib/collectd collectd |
187 |
} |
191 |
} |
188 |
|
192 |
|
189 |
src_prepare() { |
193 |
src_prepare() { |
Lines 250-255
src_configure() {
Link Here
|
250 |
fi |
254 |
fi |
251 |
myconf+=" --disable-${plugin}" |
255 |
myconf+=" --disable-${plugin}" |
252 |
fi |
256 |
fi |
|
|
257 |
elif [[ "${plugin}" = "collectd_plugins_perl" ]]; then |
258 |
if use collectd_plugins_perl && ! use perl; then |
259 |
ewarn "Perl plugin disabled as perl bindings disabled by -perl use flag" |
260 |
myconf+= --disable-perl |
261 |
else |
262 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
263 |
fi |
253 |
else |
264 |
else |
254 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
265 |
myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
255 |
fi |
266 |
fi |
Lines 265-272
src_configure() {
Link Here
|
265 |
myconf+=" --with-libiptc=no" |
276 |
myconf+=" --with-libiptc=no" |
266 |
fi |
277 |
fi |
267 |
|
278 |
|
|
|
279 |
myconf+=" $(use_with perl perl-bindings)" |
280 |
|
268 |
# Finally, run econf. |
281 |
# Finally, run econf. |
269 |
KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl --disable-static --localstatedir=/var ${myconf} |
282 |
KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl $(use_enable static-libs static) --localstatedir=/var ${myconf} |
270 |
} |
283 |
} |
271 |
|
284 |
|
272 |
src_install() { |
285 |
src_install() { |
Lines 275-280
src_install() {
Link Here
|
275 |
fixlocalpod |
288 |
fixlocalpod |
276 |
|
289 |
|
277 |
find "${D}/usr/" -name "*.la" -exec rm -f {} + |
290 |
find "${D}/usr/" -name "*.la" -exec rm -f {} + |
|
|
291 |
rm -f ${D}/usr/$(get_libdir)/collectd/*.a |
292 |
use collectd_plugins_ping && setcap cap_net_raw+ep ${D}/usr/sbin/collectd |
293 |
chown root:collectd ${D}/etc/collectd.conf |
294 |
chmod u=rw,g=r,o= ${D}/etc/collectd.conf |
278 |
|
295 |
|
279 |
dodoc AUTHORS ChangeLog NEWS README TODO || die |
296 |
dodoc AUTHORS ChangeLog NEWS README TODO || die |
280 |
|
297 |
|
Lines 284-289
src_install() {
Link Here
|
284 |
fi |
301 |
fi |
285 |
|
302 |
|
286 |
keepdir /var/lib/${PN} || die |
303 |
keepdir /var/lib/${PN} || die |
|
|
304 |
chown collectd:collectd ${D}/var/lib/${PN} |
287 |
|
305 |
|
288 |
newinitd "${FILESDIR}/${PN}.initd" ${PN} || die |
306 |
newinitd "${FILESDIR}/${PN}.initd" ${PN} || die |
289 |
newconfd "${FILESDIR}/${PN}.confd" ${PN} || die |
307 |
newconfd "${FILESDIR}/${PN}.confd" ${PN} || die |
Lines 291-296
src_install() {
Link Here
|
291 |
insinto /etc/logrotate.d |
309 |
insinto /etc/logrotate.d |
292 |
newins "${FILESDIR}/logrotate" collectd || die |
310 |
newins "${FILESDIR}/logrotate" collectd || die |
293 |
|
311 |
|
|
|
312 |
sed -i -e 's:^#PIDFile "/var/run/collectd.pid":PIDFile "/var/run/collectd/collectd.pid":' "${D}"/etc/collectd.conf || die |
313 |
sed -i -e 's:^# SocketFile "/var/run/collectd-unixsock":# SocketFile "/var/run/collectd/collectd-unixsock":' "${D}"/etc/collectd.conf || die |
294 |
sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
314 |
sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
295 |
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
315 |
sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
296 |
} |
316 |
} |