Magellan Linux

Contents of /trunk/core/iproute2/iproute2-3.2.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10131 - (show annotations) (download)
Tue Jan 17 12:47:14 2012 UTC (12 years, 4 months ago) by niro
File size: 1588 byte(s)
-readded xtables patch
1 # $Id$
2
3 PNAME="iproute2"
4 PVER="3.2.0"
5 PBUILD="r1"
6
7 PCAT="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.3
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.xz"
28 SRCDIR="${BUILDDIR}/${PNAME}-${MYPVER}"
29
30 sminclude mbuild
31
32 SRC_URI=(
33 http://www.kernel.org/pub/linux/utils/net/${PNAME}/${SRCFILE}
34 http://devresources.linux-foundation.org/dev/${PNAME}/download/${SRCFILE}
35 http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE}
36 mirror://${PNAME}/${SRCFILE}
37 mirror://${PNAME}/${PNAME}-2.6.39-xtables-api-6-fix.patch
38 )
39
40 UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/utils/net/${PNAME}/?C=M;O=A' | lasttarball xz"
41
42 src_prepare()
43 {
44 munpack ${SRCFILE} || die
45 cd ${SRCDIR}
46
47 # fix build against newer xtables API
48 mpatch ${PNAME}-2.6.39-xtables-api-6-fix.patch || die
49
50 # fix cflags
51 sed -i "s:-O2:${CFLAGS}:" Makefile || die
52
53 # fix libdir
54 sed -i "/^LIBDIR/s:=.*:=/$(mlibdir):" Makefile || die
55 }
56
57 src_compile()
58 {
59 cd ${SRCDIR}
60 mmake IPT_LIB_DIR=$(pkg-config xtables --variable=xtlibdir) SBINDIR=/sbin || die
61 }
62
63 src_install()
64 {
65 cd ${SRCDIR}
66 make DESTDIR=${BINDIR} \
67 DOCDIR=/usr/share/doc/${PNAME}-${PVER} \
68 MANDIR=/usr/share/man \
69 SBINDIR=/sbin install || die
70 minstalldocs ABOUT-NLS COPYING README* TODO || die
71 }