# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="rpc.rstatd is a server which returns performance statistics obtained from the kernel. These statistics are usually read using the rup(1) command. They are also used by the rpc.lockd(8) server during crash recovery." HOMEPAGE="http://sourceforge.net/projects/rstatd/" SRC_URI="mirror://sourceforge/${PN}/rpc.${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" DEPEND="" RDEPEND="!net-misc/netkit-rusers" S="${WORKDIR}/rpc.${P}" src_unpack() { unpack ${A} cd "${S}" # http://sourceforge.net/tracker/index.php?func=detail&aid=1546060&group_id=27012&atid=388924 epatch "${FILESDIR}"/rstat_initialize_fromlen.patch # http://sourceforge.net/tracker/index.php?func=detail&aid=1616546&group_id=27012&atid=388926 epatch "${FILESDIR}"/rpc.rstatd-netstats.patch } src_install() { emake DESTDIR="${D}" install || die "emake install failed" doinitd ${FILESDIR}/rstatd || die "doinitd failed" doman rpc.rstatd.8 rstatd.8 rup.1 rsysinfo.1 dodoc ChangeLog README einfo "Add a line to /etc/hosts.allow to allow ONLY certain hosts to make" einfo "rstatd requests:" einfo "rpc.rstatd: 192.168.0.0/255.255.255.0, 192.168.1.0/24, 127.0.0.1" einfo "rstatd can be enabled as /etc/init.d/rstatd" einfo "" einfo "If you prefer to run it under xinetd you have to copy the xinetd.rstatd" einfo "file under /etc/xinetd.d/rstatd and run 'rc-update del rstatd'" }