summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/symon/symon-2.87.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/symon/symon-2.87.ebuild')
-rw-r--r--net-analyzer/symon/symon-2.87.ebuild107
1 files changed, 107 insertions, 0 deletions
diff --git a/net-analyzer/symon/symon-2.87.ebuild b/net-analyzer/symon/symon-2.87.ebuild
new file mode 100644
index 000000000000..3ac8f5483f5d
--- /dev/null
+++ b/net-analyzer/symon/symon-2.87.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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}
+
+# Deletes the directory passed as an argument from the internal pmake
+# variable SUBDIR.
+zap_subdir() {
+ sed -i "/^SUBDIR/s|$1||" Makefile || die
+}
+
+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_prepare() {
+ sed -i \
+ -e '/^[ \t]*${CC}.*\${LIBS}/s:\${CC}:$(CC) $(LDFLAGS):' \
+ sym*/Makefile || die
+}
+
+src_configure() {
+ # 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
+
+ newinitd "${FILESDIR}"/symon-init.d symon
+
+ dodoc CHANGELOG HACKERS TODO
+
+ doman symon/symon.8
+ dosbin symon/symon
+ fi
+
+ if use perl; then
+ dobin client/getsymonitem.pl
+
+ perl_set_version
+ insinto ${VENDOR_LIB}
+ doins client/SymuxClient.pm
+ fi
+
+ if use symux; then
+ insinto /etc
+ doins "${FILESDIR}"/symux.conf
+
+ newinitd "${FILESDIR}"/symux-init.d symux
+
+ doman symux/symux.8
+ dosbin symux/symux
+
+ dodir /usr/share/symon
+ insinto /usr/share/symon
+ doins symux/c_smrrds.sh
+ fperms a+x /usr/share/symon/c_smrrds.sh
+
+ dodir /var/lib/symon/rrds/localhost
+ fi
+}
+
+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
+}