1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils perl-module toolchain-funcs
7 DESCRIPTION="Performance and information monitoring tool"
8 HOMEPAGE="https://wpd.home.xs4all.nl/symon/"
9 SRC_URI="https://wpd.home.xs4all.nl/symon/philes/${P}.tar.gz"
13 KEYWORDS="~amd64 ~sparc ~x86"
14 IUSE="perl +symon symux"
16 || ( perl symon symux )
20 perl? ( dev-lang/perl )
21 symux? ( net-analyzer/rrdtool )
30 # Deletes the directory passed as an argument from the internal pmake
33 sed -i "/^SUBDIR/s|$1||" Makefile || die
40 -e '/^[ \t]*${CC}.*\${LIBS}/s:\${CC}:$(CC) $(LDFLAGS):' \
45 use symon && USE_SYMON=1
46 # Do some sed magic in accordance with the USE flags.
47 use perl && [[ -z ${USE_SYMON} ]] && ! use symux && zap_subdir lib
48 ! use perl && zap_subdir client
49 ! use symux && zap_subdir symux
50 [[ -z ${USE_SYMON} ]] && zap_subdir symon
54 pmake CC="$(tc-getCC)" CFLAGS+="${CFLAGS}" STRIP=true || die
58 if [[ -n ${USE_SYMON} ]]; then
60 doins "${FILESDIR}"/symon.conf
62 newinitd "${FILESDIR}"/symon-init.d symon
64 dodoc CHANGELOG HACKERS TODO
71 dobin client/getsymonitem.pl
75 doins client/SymuxClient.pm
80 doins "${FILESDIR}"/symux.conf
82 newinitd "${FILESDIR}"/symux-init.d symux
87 dodir /usr/share/symon
88 insinto /usr/share/symon
89 doins symux/c_smrrds.sh
90 fperms a+x /usr/share/symon/c_smrrds.sh
92 dodir /var/lib/symon/rrds/localhost
98 elog "The RRDs files can be obtained by running"
99 elog "/usr/share/symon/c_smrrds.sh all."
100 elog "For information about migrating RRDs from a previous"
101 elog "symux version read the LEGACY FORMATS section of symux(8)."
102 elog "To view the rrdtool pictures of the stored data, emerge"
103 elog "net-analyzer/syweb."