# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Dynamic internet shaper" HOMEPAGE="http://sp9wun.republika.pl/linux/shaperd_cbq.html" SRC_URI="http://sp9wun.republika.pl/prg/shaperd.${PV}.tar.gz" LICENSE="GPL-2" KEYWORDS="~x86 ~amd64" IUSE="examples php" RESTRICT="distcc" DEPEND="php? (dev-lang/php) sys-apps/iproute2 net-firewall/iptables" RDEPEND="${DEPEND}" src_unpack() { unpack ${A} cd ${WORKDIR}/shaperd sed -i s/INSTALL_PREFIX=\"\"/INSTALL_PREFIX=\${D}/ Makefile #because email.gif isn't included in tarball, we use email.png #(which is taken from kmail) installed by ebuild sed -i s/pics\\/email.gif/email.png/ scripts/kto.php } src_compile() { cd ${WORKDIR}/shaperd make } src_install() { cd ${WORKDIR}/shaperd make install exeinto /etc/init.d doexe ${FILESDIR}/shaperd if use examples; then cd ${WORKDIR}/shaperd make install-config fi; if use php; then dosbin scripts/kto-daemon insinto /var/www/localhost/htdocs/ doins scripts/kto.php doins ${FILESDIR}/email.png fi; }