# $Header: /magellan-cvs/smage/iproute2/iproute2-2.6.26-r1.smage2,v 1.1 2008/08/17 09:53:11 niro Exp $ PNAME="iproute2" PVER="2.6.26" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="Collection of utilities for controlling TCP/IP networking and Traffic Control." HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2" # arpd needs db DEPEND=">= dev-db/db-4.6" SDEPEND=">= virtual/kernel-headers >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER/_20/-}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER/_20/-}" sminclude mbuild SRC_URI=( http://developer.osdl.org/dev/${PNAME}/download/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix cflags sed -i "s:-O2:${CFLAGS}:" Makefile || die # fix iptables location sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h || die sed -i "s:/usr/local/lib/iptables:/$(mlibdir)/iptables:g" include/iptables.h || die # fix libdir sed -i "s:/usr/lib:/usr/$(mlibdir):g" netem/Makefile || die sed -i "s:/usr/lib:/usr/$(mlibdir):g" tc/{Makefile,tc.c,q_netem.c,m_ipt.c} || die sed -i "s:/usr/lib:/usr/$(mlibdir):g" include/iptables.h || die || die } src_compile() { cd ${SRCDIR} mmake SBINDIR=/sbin || die } src_install() { cd ${SRCDIR} make DESTDIR=${BINDIR} \ DOCDIR=/usr/share/doc/${PNAME}-${PVER} \ SBINDIR=/sbin install || die minstalldocs ABOUT-NLS COPYING README* TODO || die }