diff options
author | Peter Volkov <pva@gentoo.org> | 2008-08-27 06:18:34 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-08-27 06:18:34 +0000 |
commit | c34af145afd5535a79de42111e0238c1eab95316 (patch) | |
tree | 780511d04fa2cca1545a119b87fe6aac0d1aeb52 /net-analyzer/symon | |
parent | goffice and libgsf need to be built with USE=gnome. check in pkg_setup and (diff) | |
download | historical-c34af145afd5535a79de42111e0238c1eab95316.tar.gz historical-c34af145afd5535a79de42111e0238c1eab95316.tar.bz2 historical-c34af145afd5535a79de42111e0238c1eab95316.zip |
Added symon USE flag to make it possible build only client: either perl client or symux, thank Tiago Cunha for the work.
Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 i686
Diffstat (limited to 'net-analyzer/symon')
-rw-r--r-- | net-analyzer/symon/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/symon/Manifest | 5 | ||||
-rw-r--r-- | net-analyzer/symon/metadata.xml | 1 | ||||
-rw-r--r-- | net-analyzer/symon/symon-2.79-r4.ebuild | 128 |
4 files changed, 139 insertions, 3 deletions
diff --git a/net-analyzer/symon/ChangeLog b/net-analyzer/symon/ChangeLog index 89c0244e7158..3aca58abbf1f 100644 --- a/net-analyzer/symon/ChangeLog +++ b/net-analyzer/symon/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/symon # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/ChangeLog,v 1.2 2008/08/19 10:28:52 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/ChangeLog,v 1.3 2008/08/27 06:18:34 pva Exp $ + +*symon-2.79-r4 (27 Aug 2008) + + 27 Aug 2008; Peter Volkov <pva@gentoo.org> +symon-2.79-r4.ebuild: + Added symon USE flag to make it possible build only client: either perl + client or symux, thank Tiago Cunha for the work. *symon-2.79-r3 (19 Aug 2008) diff --git a/net-analyzer/symon/Manifest b/net-analyzer/symon/Manifest index 9a69d1e09965..d0da7e65d3de 100644 --- a/net-analyzer/symon/Manifest +++ b/net-analyzer/symon/Manifest @@ -4,5 +4,6 @@ AUX symon-symux.conf.patch 1858 RMD160 8882ef430e763791a47be90a1460f85550cc3e8b AUX symux-init.d 378 RMD160 438f3ee87579117db71fa346cd333cc4740b8a35 SHA1 bc5edf413f24aed698147767447f0266c4374415 SHA256 f887ab858987fc6f0984cba93dddbb1c82fb1ed515340002e373c0aa4541e584 DIST symon-2.79.tar.gz 102400 RMD160 693b798cd6c564f4e8b79c62c1776f5b036aaf1a SHA1 a21566f3291baaa39806bec32550d5a28a163213 SHA256 7157b087b99a59f3aba9a02c375fb1b411dc4329463f748d2323c3cdf3d0cd83 EBUILD symon-2.79-r3.ebuild 3022 RMD160 9cfaf95e29b3666de07311926274f99a69180a45 SHA1 48b0c74491678908e648a2fe65ad4fd13228fef7 SHA256 a8d5df109e8e9b1e64c6a366f160d2b7ed0b4306ef4449cbe566265fb38af331 -MISC ChangeLog 7091 RMD160 f04308712d28b5880027f64646e8083dbcb8ee01 SHA1 15917ffb00f3d81787325388211496df6688e50b SHA256 5a323602005b842d21f1cfb28ede47f7e48978ee3adc032fc1117ca96a3ab279 -MISC metadata.xml 454 RMD160 20d5590da9a48eb2fbc78b207e6f1636152007e9 SHA1 46b74a457cb0d9073095e5a28569619d6e2c16d0 SHA256 d2b43ad2ea7e765539e213db74dad9ed3a11bbadb73b52c1e2c9773ec012e22d +EBUILD symon-2.79-r4.ebuild 3602 RMD160 a416442f75fdbebf03ddfa5bd1c378de574054ec SHA1 e634ee091705db8c121bec2fd45b0cd6bf438839 SHA256 4fcebdf5d977ebd8ee230298c71f95ab6679edfd9c4392a90a82b93f88c1039e +MISC ChangeLog 7315 RMD160 393c1fb1b4ad9af8a8d7071fc89571ebe5acc140 SHA1 d721ee8364c46efe031bf5771888dcf9b1cf15b1 SHA256 718c85bb4e1e582048510270517f5ef869c3018db765694f63b2fe0bd4cb9825 +MISC metadata.xml 501 RMD160 47d54b95742eff496cd59e30ebb98b8f19a98314 SHA1 91a228da58858b789acf452cb01bf17ee5216465 SHA256 d6a4e4d38bf02b4858d066450665ee1a7b6d7a491be16c1ddffeecb0089043c1 diff --git a/net-analyzer/symon/metadata.xml b/net-analyzer/symon/metadata.xml index 2b594d5220dd..3bb72b302745 100644 --- a/net-analyzer/symon/metadata.xml +++ b/net-analyzer/symon/metadata.xml @@ -8,6 +8,7 @@ </maintainer> <use> <flag name='perl'>Enables a generic perl symux client</flag> + <flag name='symon'>Build symon daemon</flag> <flag name='symux'>Enables the multiplexer which stores incoming symon streams on disk in RRD files</flag> </use> diff --git a/net-analyzer/symon/symon-2.79-r4.ebuild b/net-analyzer/symon/symon-2.79-r4.ebuild new file mode 100644 index 000000000000..029e8107b023 --- /dev/null +++ b/net-analyzer/symon/symon-2.79-r4.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/symon-2.79-r4.ebuild,v 1.1 2008/08/27 06:18:34 pva Exp $ + +EAPI=1 + +inherit eutils perl-module toolchain-funcs + +DESCRIPTION="Performance and information monitoring tool" +HOMEPAGE="http://www.xs4all.nl/~wpd/symon/" +SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="perl +symon symux" + +RDEPEND="perl? ( dev-lang/perl ) + symux? ( net-analyzer/rrdtool )" +DEPEND="${RDEPEND} + virtual/pmake" + +S=${WORKDIR}/${PN} + +build_symon() { + [[ -n "${BUILD_SYMON}" ]] && return 0 || return 1 +} + +zap_subdir() { + sed -i "/SUBDIR/s/$1//" "${S}"/Makefile || die "sed $1 failed" +} + +pkg_setup() { + if ! use perl && ! use symon && ! use symux ; then + ewarn "You have perl, symon, and symux USE flags disabled." + ewarn "That means I have nothing to install but, I'll emerge the" + ewarn "system monitor as default. Please, enable at least one USE" + ewarn "flag to avoid this message." + BUILD_SYMON=YES + fi + use symon && BUILD_SYMON=YES +} + +src_unpack() { + unpack ${A} + + build_symon && epatch "${FILESDIR}"/${PN}-symon.conf.patch + use symux && epatch "${FILESDIR}"/${PN}-symux.conf.patch + + sed -i '/${CC}.*${LIBS}/s/${CC}/& ${LDFLAGS}/' \ + "${S}"/sym{on,ux}/Makefile || die "sed ldflags failed" + + use perl && ! use symon && ! use symux && zap_subdir lib + ! use perl && zap_subdir client + ! use symux && zap_subdir symux + build_symon || zap_subdir symon +} + +src_compile() { + MAKE=pmake MAKEOPTS= emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + CFLAGS+="${CFLAGS}" \ + RANLIB="$(tc-getRANLIB)" \ + STRIP=true || die "emake failed" +} + +src_install() { + if use perl ; then + dobin client/getsymonitem.pl || die "dobin getsymonitem.pl failed" + + perlinfo + insinto ${SITE_LIB} + doins client/SymuxClient.pm || die "doins SymuxClient.pm failed" + fi + + if build_symon ; then + insinto /etc + doins symon/symon.conf || die "doins symon.conf failed" + + newinitd "${FILESDIR}"/${PN}-init.d ${PN} || die "newinitd symon failed" + + dodoc CHANGELOG HACKERS TODO || die "dodoc failed" + + doman symon/symon.8 || die "doman symon failed" + dosbin symon/symon || die "dosbin symon failed" + + dodir /usr/share/symon + insinto /usr/share/symon + doins symon/c_config.sh || die "doins c_config.sh failed" + fperms a+x,u-w /usr/share/symon/c_config.sh + fi + + if use symux ; then + insinto /etc + doins symux/symux.conf || die "doins symux.conf failed" + + newinitd "${FILESDIR}"/symux-init.d symux || die "newinitd symux failed" + + doman symux/symux.8 || die "doman symux failed" + dosbin symux/symux || die "dosbin symux failed" + + insinto /usr/share/symon + doins symux/c_smrrds.sh || die "doins c_smrrds.sh failed" + fperms u-w,u+x /usr/share/symon/c_smrrds.sh + + dodir /var/lib/symon/rrds/localhost + fi +} + +pkg_postinst() { + use perl && perl-module_pkg_postinst + + if build_symon ; then + elog "Before running the monitor, edit /etc/symon.conf. To test your" + elog "configuration file, run symon -t." + elog "NOTE that symon won't chroot by default." + fi + + if use symux ; then + elog "Before running the data collector, edit /etc/symux.conf." + elog "To create the RRDs run /usr/share/symon/c_smrrds.sh all. Then," + elog "to test your configuration file, run symux -t." + elog "For information about migrating RRDs from a previous symux" + elog "version read the LEGACY FORMATS section of symux(8)." + elog "To view the rrdtool pictures of the stored data, emerge syweb." + fi +} |