summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gentoo.org>2009-12-01 18:25:22 +0000
committerTiago Cunha <tcunha@gentoo.org>2009-12-01 18:25:22 +0000
commitbaa6b40afc9aac1be55937b2c6cd33ac994d9f6b (patch)
tree06082be112f46f973d11e91592c4475e8d15bf02 /net-analyzer/symon
parentVersion bump wrt #294106, thanks to Shark <shark at bitchx.it> for reporting.... (diff)
downloadgentoo-2-baa6b40afc9aac1be55937b2c6cd33ac994d9f6b.tar.gz
gentoo-2-baa6b40afc9aac1be55937b2c6cd33ac994d9f6b.tar.bz2
gentoo-2-baa6b40afc9aac1be55937b2c6cd33ac994d9f6b.zip
- Version bump.
- Remove old. (Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/symon')
-rw-r--r--net-analyzer/symon/ChangeLog176
-rw-r--r--net-analyzer/symon/files/symon-symon.conf.patch29
-rw-r--r--net-analyzer/symon/files/symon-symux.conf.patch62
-rw-r--r--net-analyzer/symon/files/symon.conf14
-rw-r--r--net-analyzer/symon/files/symux.conf35
-rw-r--r--net-analyzer/symon/metadata.xml4
-rw-r--r--net-analyzer/symon/symon-2.79-r5.ebuild128
-rw-r--r--net-analyzer/symon/symon-2.80.ebuild111
8 files changed, 172 insertions, 387 deletions
diff --git a/net-analyzer/symon/ChangeLog b/net-analyzer/symon/ChangeLog
index 6899d66c8244..d6398e9f162d 100644
--- a/net-analyzer/symon/ChangeLog
+++ b/net-analyzer/symon/ChangeLog
@@ -1,6 +1,14 @@
# 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.7 2008/12/08 15:09:19 tcunha Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/ChangeLog,v 1.8 2009/12/01 18:25:22 tcunha Exp $
+
+*symon-2.80 (01 Dec 2009)
+
+ 01 Dec 2009; Tiago Cunha <tcunha@gentoo.org> -symon-2.79-r5.ebuild,
+ +symon-2.80.ebuild, +files/symon.conf, -files/symon-symon.conf.patch,
+ -files/symon-symux.conf.patch, +files/symux.conf, metadata.xml:
+ - Version bump.
+ - Remove old.
08 Dec 2008; Tiago Cunha <tcunha@gentoo.org> metadata.xml,
symon-2.79-r5.ebuild:
@@ -45,167 +53,3 @@
Initial import from sunrise, bug #176635. Syweb splited into separate
package. Thank Tiago Cunha for all the work.
- 11 Aug 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> metadata.xml:
- Add USE flag description to metadata wrt GLEP 56
-
- 06 Aug 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.79-r1.ebuild:
- Improve syweb elog messages by saying how to customize it, and mention that
- there's a no user interaction php script
-
- 06 Aug 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> -symon-2.79.ebuild,
- +symon-2.79-r1.ebuild:
- Install syweb documentation, remove old
-
- 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- symon doesn't use GNU make, hence ignore MAKEOPTS since some options aren't
- available in pmake (e.g. --load-average)
-
- 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Tell the user how to test the configuration files, and how the RRDs
- directory structure for syweb should be organized
-
- 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Make doins, dodoc, doman, dosbin, and dobin die on failure
-
- 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Shorten DESCRIPTION
-
- 21 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Improve elog messages
-
- 16 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Rename 'client' USE flag to 'perl'
-
- 11 Jun 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Simplify die messages, while there avoid using identical die messages in the
- same function to ease error identification
-
- 03 Jun 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Simplify sed calls
-
- 31 May 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Respect AR and RANLIB, while there beautify the ebuild
-
- 08 Apr 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild:
- Prettify src_compile, virtual/httpd-cgi removed from RDEPEND since it isn't
- needed
-
- 08 Apr 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- -symon-2.78-r2.ebuild, +symon-2.79.ebuild:
- Version bump (syweb bumped too), remove old
-
- 21 Mar 2008; Jakub Moc <jakub@gentoo.org> symon-2.78-r2.ebuild:
- Improve webapp eclass handling and fix dependencies
-
- 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- files/symon-symon.conf.patch, files/symon-symux.conf.patch:
- Prettify the configuration files, add resources for MP machines, while there
- insert missing comments to document the patch purpose
-
- 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- files/symon-syweb-class_lexer.inc.patch,
- files/symon-syweb-setup.inc.patch,
- files/symon-syweb-total_firewall.layout.patch:
- Improve patch comment about renaming the directories, while there prettify them
-
- 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r2.ebuild:
- Tell the user to test the configuration files only after creating the RRDs,
- since symux reads the configuration file with file access checks (prevents
- symux -t from giving warnings)
-
- 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> files/symon-init.d,
- files/symux-init.d:
- Beautify the code by converting spaces to tabs
-
- 23 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r2.ebuild:
- Remove slash from docinto, simplify elog messages
-
- 19 Feb 2008; Jakub Moc <jakub@gentoo.org> symon-2.78-r2.ebuild:
- Fix php check in pkg_setup, add missing pkg_prerm for webapp.eclass
-
- 18 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r2.ebuild:
- Introduce a new variable (CDEPEND) that will hold common dependencies for
- (R)DEPEND
-
- 18 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- -symon-2.78-r1.ebuild, +symon-2.78-r2.ebuild:
- New USE flag 'client' added, remove old
-
- 17 Feb 2008; (Tommy[D]) tommy100@gmx.de symon-2.78-r1.ebuild:
- Shorten description
-
- 03 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> files/symon-init.d,
- files/symux-init.d:
- net is really necessary for the correct functioning of the service
-
- 03 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Simplify elog messages
-
- 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Die if sed failed
-
- 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Append Gentoo CFLAGS in src_compile by using the CFLAGS variable from the
- portage environment instead of doing it with sed in src_unpack
-
- 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Put sed calls after epatch ones to prevent breaking patches, and use "${S}"
- instead of hardcoding the directories
-
- 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Do a safer pattern in sed when the user requested not to build the symux target
-
- 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Instead of using sed and avoiding pre-stripping in src_unpack, make the
- package use the STRIP variable from the portage environment in src_compile
-
- 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Instead of using sed and tc-getCC to call the correct gcc in src_unpack,
- make the package use the proper CC from the portage environment in
- src_compile
-
- 10 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Avoid pre-stripping
-
- 10 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Honour Gentoo CFLAGS
-
- 10 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org>
- symon-2.78-r1.ebuild:
- Fix hardcoded CC
-
- 09 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> files/symon-init.d,
- +files/symux-init.d, -symon-2.78.ebuild, +symon-2.78-r1.ebuild:
- New USE flag 'symux' added, remove old
-
- 08 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.78.ebuild:
- Added ~amd64 keyword
-
- 07 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.78.ebuild:
- Bump syweb, too
-
- 07 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> -symon-2.77.ebuild,
- +symon-2.78.ebuild:
- Version bump, remove old
-
- 06 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> +files/symon-init.d,
- +files/symon-symon.conf.patch, +files/symon-symux.conf.patch,
- +files/symon-syweb-class_lexer.inc.patch,
- +files/symon-syweb-setup.inc.patch,
- +files/symon-syweb-total_firewall.layout.patch, +metadata.xml,
- +symon-2.77.ebuild:
- New Ebuild for bug 176635
-
diff --git a/net-analyzer/symon/files/symon-symon.conf.patch b/net-analyzer/symon/files/symon-symon.conf.patch
deleted file mode 100644
index 12a006835fb8..000000000000
--- a/net-analyzer/symon/files/symon-symon.conf.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-# Convert BSD devices to Linux.
-# mbuf, pf, proc, and sensor are not available in Linux.
-
---- symon/symon/symon.conf.orig 2008-03-18 03:46:17.173140738 +0000
-+++ symon/symon/symon.conf 2008-03-18 04:49:07.463331989 +0000
-@@ -3,13 +3,14 @@
- #
- # Demo configuration for symon. See symon(8) for BNF.
-
--monitor { cpu(0), mem,
-- if(lo0),
--# pf,
--# mbuf,
--# sensor(0),
--# proc(httpd),
--# if(xl0), if(de0), if(wi0),
--# io(wd1), io(wd2), io(wd3), io(cd0)
-- io(wd0)
-+monitor {
-+ cpu(0),
-+ cpu(1),
-+# cpu(2),
-+ mem,
-+ if(lo),
-+ if(eth0),
-+# if(eth1),
-+# io(hda), io(hdb), io(hdc), io(hdd),
-+ io(sda), io(sdb)
- } stream to 127.0.0.1 2100
diff --git a/net-analyzer/symon/files/symon-symux.conf.patch b/net-analyzer/symon/files/symon-symux.conf.patch
deleted file mode 100644
index c6a020855051..000000000000
--- a/net-analyzer/symon/files/symon-symux.conf.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-# Convert BSD devices to Linux.
-# mbuf, pf, proc, and sensor are not available in Linux.
-# Rename RRDs directories since it makes more sense in a non-syweb environment.
-
---- symon/symux/symux.conf.orig 2008-03-18 03:51:21.083141917 +0000
-+++ symon/symux/symux.conf 2008-03-18 04:49:17.643141246 +0000
-@@ -6,31 +6,36 @@
- mux 127.0.0.1 2100
-
- source 127.0.0.1 {
-- accept { cpu(0), mem,
-- if(lo0),
--# pf,
--# mbuf,
--# sensor(0),
--# proc(httpd),
--# if(xl0), if(de0), if(wi0),
--# io(wd1), io(wd2), io(wd3), io(cd0)
-- io(wd0)
-+ accept {
-+ cpu(0),
-+ cpu(1),
-+# cpu(2),
-+ mem,
-+ if(lo),
-+ if(eth0),
-+# if(eth1),
-+# io(hda), io(hdb), io(hdc), io(hdd),
-+ io(sda), io(sdb)
- }
--
-+ datadir "/var/lib/symon/rrds/localhost"
- }
-
- # an example showing the write directive
- #
- # source 10.0.0.2 {
--# accept { cpu(0), mem, if(sis0), if(sis1),
--# if(lo0), if(wi0), io(wd0)
-+# accept {
-+# cpu(0),
-+# mem,
-+# if(eth0), if(eth1),
-+# if(lo),
-+# if(hda), io(sda)
- # }
- #
--# write cpu(0) in "/var/www/symon/rrds/4512/cpu0.rrd"
--# write mem in "/var/www/symon/rrds/4512/mem.rrd"
--# write if(sis0) in "/var/www/symon/rrds/4512/if_sis0.rrd"
--# write if(sis1) in "/var/www/symon/rrds/4512/if_sis1.rrd"
--# write if(lo0) in "/var/www/symon/rrds/if_lo0.rrd"
--# write if(wi0) in "/var/www/symon/rrds/4512/if_wi0.rrd"
--# write io(wd0) in "/var/www/symon/rrds/4512/io_wd0.rrd"
-+# write cpu(0) in "/var/lib/symon/rrds/hostname/cpu0.rrd"
-+# write mem in "/var/lib/symon/rrds/hostname/mem.rrd"
-+# write if(eth0) in "/var/lib/symon/rrds/hostname/if_eth0.rrd"
-+# write if(eth1) in "/var/lib/symon/rrds/hostname/if_eth1.rrd"
-+# write if(lo) in "/var/lib/symon/rrds/hostname/if_lo.rrd"
-+# write io(hda) in "/var/lib/symon/rrds/hostname/io_hda.rrd"
-+# write io(sda) in "/var/lib/symon/rrds/hostname/io_sda.rrd"
- # }
diff --git a/net-analyzer/symon/files/symon.conf b/net-analyzer/symon/files/symon.conf
new file mode 100644
index 000000000000..920662185e58
--- /dev/null
+++ b/net-analyzer/symon/files/symon.conf
@@ -0,0 +1,14 @@
+#
+# Demo configuration for symon. See symon(8) for BNF.
+#
+
+monitor { cpu(0), mem,
+ if(lo),
+# cpuiow(0),
+# sensor(fan0), sensor(in0), sensor(temp0),
+# if(eth0), if(eth1), if(eth2),
+# df(sda),
+# smart(sda),
+# io(hda), io(hdb), io(hdc), io(hdd)
+ io(sda)
+} stream to 127.0.0.1 2100
diff --git a/net-analyzer/symon/files/symux.conf b/net-analyzer/symon/files/symux.conf
new file mode 100644
index 000000000000..fa0ed50631d7
--- /dev/null
+++ b/net-analyzer/symon/files/symux.conf
@@ -0,0 +1,35 @@
+#
+# Demo symux configuration. See symux(8) for BNF.
+#
+
+mux 127.0.0.1 2100
+
+source 127.0.0.1 {
+ accept { cpu(0), mem,
+ if(lo),
+# cpuiow(0),
+# sensor(fan0), sensor(in0), sensor(temp0),
+# if(eth0), if(eth1), if(eth2),
+# df(sda),
+# smart(sda),
+# io(hda), io(hdb), io(hdc), io(hdd)
+ io(sda)
+ }
+ datadir "/var/lib/symon/rrds/localhost"
+}
+
+# an example showing the write directive
+#
+# source 10.0.0.2 {
+# accept { cpu(0), mem, if(eth0), if(eth1),
+# if(lo), if(eth2), io(sda)
+# }
+#
+# write cpu(0) in "/var/lib/symon/rrds/<host>/cpu0.rrd"
+# write mem in "/var/lib/symon/rrds/<host>/mem.rrd"
+# write if(eth0) in "/var/lib/symon/rrds/<host>/if_eth0.rrd"
+# write if(eth1) in "/var/lib/symon/rrds/<host>/if_eth1.rrd"
+# write if(lo) in "/var/lib/symon/rrds/<host>/if_lo.rrd"
+# write if(eth2) in "/var/lib/symon/rrds/<host>/if_eth2.rrd"
+# write io(sda) in "/var/lib/symon/rrds/<host>/io_sda.rrd"
+# }
diff --git a/net-analyzer/symon/metadata.xml b/net-analyzer/symon/metadata.xml
index e1c64130759e..ca9cce57eaed 100644
--- a/net-analyzer/symon/metadata.xml
+++ b/net-analyzer/symon/metadata.xml
@@ -7,8 +7,8 @@
</maintainer>
<use>
<flag name='perl'>Enables a generic perl symux client</flag>
- <flag name='symon'>Enables the lightweight system monitor. Offers no
- functionality but monitoring and forwarding of measured data</flag>
+ <flag name='symon'>Enables the system monitor. Offers no functionality
+ but monitoring and forwarding of measured data</flag>
<flag name='symux'>Enables the multiplexer which stores incoming symon
streams on disk in RRD (<pkg>net-analyzer/rrdtool</pkg>) files</flag>
</use>
diff --git a/net-analyzer/symon/symon-2.79-r5.ebuild b/net-analyzer/symon/symon-2.79-r5.ebuild
deleted file mode 100644
index 994224ba9fe3..000000000000
--- a/net-analyzer/symon/symon-2.79-r5.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# 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-r5.ebuild,v 1.2 2008/12/08 15:09:19 tcunha 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() {
- pmake \
- 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
-}
diff --git a/net-analyzer/symon/symon-2.80.ebuild b/net-analyzer/symon/symon-2.80.ebuild
new file mode 100644
index 000000000000..378c8baa88d5
--- /dev/null
+++ b/net-analyzer/symon/symon-2.80.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/symon-2.80.ebuild,v 1.1 2009/12/01 18:25:22 tcunha Exp $
+
+EAPI="1"
+
+inherit 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}
+
+# Deletes the directory passed as an argument from the internal pmake
+# variable SUBDIR.
+zap_subdir() {
+ sed -i "/^SUBDIR/s/$1//" Makefile || die "sed $1 failed"
+}
+
+pkg_setup() {
+ use symon && USE_SYMON=1 && return
+
+ if ! use perl && ! use symon && ! use symux; then
+ ewarn "You have all available USE flags disabled. Therefore, only the"
+ ewarn "system monitor will be emerged. Please, enable at least one USE"
+ ewarn "flag to avoid this message."
+ USE_SYMON=1
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Respect LDFLAGS.
+ sed -i "/^[ \t]*\${CC}.*\${LIBS}/s/\${CC}/& \${LDFLAGS}/" sym*/Makefile \
+ || die "sed ldflags failed"
+
+ # Do some sed magic in accordance with the USE flags.
+ use perl && [[ -z ${USE_SYMON} ]] && ! use symux && zap_subdir lib
+ ! use perl && zap_subdir client
+ ! use symux && zap_subdir symux
+ [[ -z ${USE_SYMON} ]] && zap_subdir symon
+}
+
+src_compile() {
+ pmake CC="$(tc-getCC)" CFLAGS+="${CFLAGS}" STRIP=true || die "pmake failed"
+}
+
+src_install() {
+ if [[ -n ${USE_SYMON} ]]; then
+ insinto /etc
+ doins "${FILESDIR}"/symon.conf || die "doins symon.conf failed"
+
+ newinitd "${FILESDIR}"/symon-init.d symon || 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"
+ fi
+
+ if use perl; then
+ dobin client/getsymonitem.pl || die "dobin getsymonitem.pl failed"
+
+ perlinfo
+ insinto ${VENDOR_LIB}
+ doins client/SymuxClient.pm || die "doins SymuxClient.pm failed"
+ fi
+
+ if use symux; then
+ insinto /etc
+ doins "${FILESDIR}"/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"
+
+ dodir /usr/share/symon
+ insinto /usr/share/symon
+ doins symux/c_smrrds.sh || die "doins c_smrrds.sh failed"
+ fperms a+x /usr/share/symon/c_smrrds.sh
+
+ dodir /var/lib/symon/rrds/localhost
+ fi
+}
+
+pkg_postinst() {
+ use perl && perl-module_pkg_postinst
+
+ if use symux; then
+ elog "The RRDs files can be obtained by running"
+ elog "/usr/share/symon/c_smrrds.sh all."
+ elog "For information about migrating RRDs from a previous"
+ elog "symux version read the LEGACY FORMATS section of symux(8)."
+ elog "To view the rrdtool pictures of the stored data, emerge"
+ elog "net-analyzer/syweb."
+ fi
+}