1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit depend.php eutils webapp
7 DESCRIPTION="A system monitor that can be used to obtain accurate and up to date information on the performance of a number of systems"
8 HOMEPAGE="http://www.xs4all.nl/~wpd/symon/"
9 SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz
10 syweb? ( http://www.xs4all.nl/~wpd/symon/philes/syweb-0.57.tar.gz )"
14 KEYWORDS="~amd64 ~sparc ~x86"
17 DEPEND="net-analyzer/rrdtool
19 RDEPEND="net-analyzer/rrdtool
20 syweb? ( virtual/httpd-php )"
23 WEBAPP_MANUAL_SLOT="yes"
26 require_php_with_use gd
33 epatch "${FILESDIR}"/${PN}-symon.conf.patch
34 epatch "${FILESDIR}"/${PN}-symux.conf.patch
36 # the default user will be symon, not _symon
37 # not really used atm, but probably will if chroot will ever be implemented
38 sed -i -e 's|_symon|symon|g' symon/symon/symon.8
41 epatch "${FILESDIR}"/${PN}-syweb-class_lexer.inc.patch
42 epatch "${FILESDIR}"/${PN}-syweb-setup.inc.patch
43 epatch "${FILESDIR}"/${PN}-syweb-total_firewall.layout.patch
48 MAKE=pmake emake || die "emake failed."
53 doins symon/symon.conf symux/symux.conf
55 newinitd "${FILESDIR}"/${PN}-init.d ${PN} || die "newinitd failed."
57 dodoc CHANGELOG HACKERS TODO
59 doman symon/symon.8 symux/symux.8
64 dodir /usr/share/symon
65 insinto /usr/share/symon
66 doins symon/c_config.sh symux/c_smrrds.sh
67 fperms a+x,u-w /usr/share/symon/c_config.sh
68 fperms u-w,u+x /usr/share/symon/c_smrrds.sh
70 dodir /var/lib/symon/rrds/localhost
74 dodoc "${WORKDIR}"/syweb/symon/total_firewall.layout
78 dodir "${MY_HTDOCSDIR}"/cache
79 dodir "${MY_HTDOCSDIR}"/layouts
80 webapp_serverowned "${MY_HTDOCSDIR}"/cache
81 insinto "${MY_HTDOCSDIR}"
82 doins -r "${WORKDIR}"/syweb/htdocs/syweb/*
83 webapp_configfile "${MY_HTDOCSDIR}"/setup.inc
91 elog "Test your syweb configuration by pointing your browser at:"
92 elog "http://${VHOST_HOSTNAME}/${PN}/configtest.php"
96 elog "You'll need to setup your ${ROOT}/etc/symon.conf and "
97 elog "${ROOT}/etc/symux.conf before running these daemons for "
98 elog "the first time."
99 elog "For an example configuration run ${ROOT}/usr/share/symon/c_config.sh"
100 elog "Then, you may run ${ROOT}/usr/share/symon/c_smrrds.sh all"
101 elog "To test the configuration run sym{on,ux} -t"
102 elog "For details, please see their manpages."
103 elog "NOTE that symon won't chroot by default."