Magellan Linux

Contents of /branches/magellan-next/core/iproute2/iproute2-2.6.38-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9057 - (show annotations) (download)
Tue Oct 4 13:44:52 2011 UTC (12 years, 8 months ago) by niro
File size: 1749 byte(s)
-fixed SRC_URI
1 # $Id$
2
3 PNAME="iproute2"
4 PVER="2.6.38"
5 PBUILD="r2"
6
7 PCATEGORIE="sys-apps"
8
9 DESCRIPTION="Collection of utilities for controlling TCP/IP networking and Traffic Control."
10 HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2"
11
12 # arpd needs db
13 DEPEND=">= dev-db/db-5.1
14 >= net-misc/iptables-1.4"
15
16 SDEPEND=">= virtual/kernel-headers
17 >= sys-apps/sed-4"
18
19 # get the right pver
20 if [[ ${PVER} != ${PVER%.*.*.*} ]]
21 then
22 MYPVER="${PVER%.*}-${PVER##*.}"
23 else
24 MYPVER="${PVER}"
25 fi
26
27 SRCFILE="${PNAME}-${MYPVER}.tar.bz2"
28 SRCDIR="${BUILDDIR}/${PNAME}-${MYPVER}"
29
30 sminclude mbuild
31
32 SRC_URI=(
33 http://devresources.linux-foundation.org/dev/${PNAME}/download/${SRCFILE}
34 http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE}
35 mirror://${PNAME}/${SRCFILE}
36 )
37
38 UP2DATE="updatecmd 'http://devresources.linux-foundation.org/dev/${PNAME}/download/?C=M;O=A' | sed -e 's:-:.:g' -e 's:iproute2.:iproute2-:g' | lasttarball"
39
40 src_prepare()
41 {
42 munpack ${SRCFILE} || die
43 cd ${SRCDIR}
44
45 # fix cflags
46 sed -i "s:-O2:${CFLAGS}:" Makefile || die
47
48 # fix iptables location
49 sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h || die
50 sed -i "s:/usr/local/lib/iptables:/$(mlibdir)/iptables:g" include/iptables.h || die
51
52 # fix libdir
53 sed -i "s:/usr/lib:/usr/$(mlibdir):g" Makefile || die
54 sed -i "s:/usr/lib:/usr/$(mlibdir):g" netem/Makefile || die
55 sed -i "s:/usr/lib:/usr/$(mlibdir):g" tc/{Makefile,tc.c,q_netem.c,m_ipt.c} || die
56 sed -i "s:/usr/lib:/usr/$(mlibdir):g" include/iptables.h || die || die
57 }
58
59 src_compile()
60 {
61 cd ${SRCDIR}
62 mmake SBINDIR=/sbin || die
63 }
64
65 src_install()
66 {
67 cd ${SRCDIR}
68 make DESTDIR=${BINDIR} \
69 DOCDIR=/usr/share/doc/${PNAME}-${PVER} \
70 SBINDIR=/sbin install || die
71 minstalldocs ABOUT-NLS COPYING README* TODO || die
72 }