# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="package for logging and displaying PPP network traffic" HOMEPAGE="http://www.hczim.de/software/index.html" SRC_URI="http://www.hczim.de/software/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=dev-lang/python-2.2 sys-apps/sed" RDEPEND=">=dev-lang/python-2.2 net-dialup/ppp virtual/cron sys-apps/psmisc sys-apps/coreutils" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/gentoo-0.8c.diff # correction epatch ${FILESDIR}/config.make.diff # python path epatch ${FILESDIR}/Makefile.diff # add DIST=GENTOO # you can remove the last patch and run instead: # DIST=DEBIAN make files || die "make failed" } src_compile() { make files || die "make failed" } src_install() { doman netcount.1 nstat.1 exeinto /etc/cron.hourly newexe netcount-cron.hourly netcount.cron #insinto /etc/logrotate.d #doins netcount-logrotate-d exeinto /etc/init.d doexe ${FILESDIR}/netcount exeinto /usr/bin doexe netcount nstat nstat.py exeinto /usr/sbin exeopts -m0700 doexe netcount-upd dodoc COPYING ChangeLog INSTALL LICENSE README #added theses scripts to doc dodoc netcount-ip-{up,down}-local dodoc netcount-logrotate-d keepdir /var/log/netcount } pkg_postinst() { einfo "add netcount to default runlevel: rc-update add netcount default" einfo "add '/usr/sbin/netcount-upd up' to your ppp start script" einfo "and '/usr/sbin/netcount-upd down' to your ppp stop script" }