blob: da5bc4e8658bc40cbe7a8cd4bc35aab7d458a78f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute/iproute-20010824-r3.ebuild,v 1.4 2003/06/22 21:11:08 kumba Exp $
inherit eutils
IUSE="tetex"
S=${WORKDIR}/iproute2
DESCRIPTION="Kernel 2.4 routing and traffic control utilities"
SRC_URI="ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gz
http://ftp.debian.org/debian/pool/main/i/iproute/${P/-/_}-9.diff.gz"
HOMEPAGE="http://www.worldbank.ro/ip-routing/"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 amd64 ~ppc sparc ~alpha ~hppa ~mips"
DEPEND="virtual/linux-sources
>=sys-apps/sed-4"
pkg_setup() {
# Make sure kernel headers are really available
check_KV
}
src_unpack() {
unpack ${A}
cd ${S}
# Our patch does two things for us; First, it syncs up with Debian's
# iproute 20010824-9 package; Secondly, it adds htb3 support. The Debian
# patch tweaks the iproute compile so that we use an included pkt_sched.h
# header rather than looking at the one in /usr/src/linux/include/linux.
# This allows us to always enable HTB3 without compile problems; however,
# other parts of the source tree are still dependent upon having a kernel
# source tree in /usr/src/linux.
epatch ${WORKDIR}/${P/-/_}-9.diff
# why was this commented out? were the programs segfaulting/not working?
# they seem ok here when i compile with optimisations, so I'm re-enabling
# this patch. if there're problems, will gladly change back. ~woodchip
sed -i \
-e "s:-O2:${CFLAGS}:g" \
-e "s:-Werror::g" Makefile || die "sed Makefile failed"
# this next thing is required to enable diffserv
# (ATM support doesn't compile right now)
sed -i \
-e 's:DIFFSERV=n:DIFFSERV=y:g' \
-e 's:ATM=y:ATM=n:g' Config || die "sed Config failed"
}
src_compile() {
emake || die
}
src_install() {
into /
cd ${S}/ip ; dosbin ifcfg ip routef routel rtacct rtmon rtpr
cd ${S}/tc ; dosbin tc
cd ${S} ; dodoc README* RELNOTES
#install Debian man pages
doman ${S}/debian/*.[1-9]
docinto examples/diffserv ; dodoc examples/diffserv/*
docinto examples ; dodoc examples/*
dodir /etc/iproute2
insinto /etc/iproute2 ; doins ${S}/etc/iproute2/*
if [ "`use tetex`" ] ; then
docinto ps ; dodoc doc/*.ps
fi
}
|