# $Id$ PNAME="iproute2" PVER="2.6.29.1" 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.8" SDEPEND=">= virtual/kernel-headers >= sys-apps/sed-4" # get the right pver if [[ ${PVER} != ${PVER%.*.*.*} ]] then MYPVER="${PVER%.*}-${PVER##*.}" else MYPVER="${PVER}" fi SRCFILE="${PNAME}-${MYPVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${MYPVER}" sminclude mbuild SRC_URI=( http://devresources.linux-foundation.org/dev/${PNAME}/download/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd 'http://devresources.linux-foundation.org/dev/${PNAME}/download/?C=M;O=A' | sed -e 's:-:.:g' -e 's:iproute2.:iproute2-:g' | lasttarball" 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 }