Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10126 - (show annotations) (download)
Tue Jan 17 09:54:57 2012 UTC (12 years, 4 months ago) by niro
File size: 1531 byte(s)
auto added: ver bump to 3.2.0-r1
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 )
38
39 UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/utils/net/${PNAME}/?C=M;O=A' | lasttarball xz"
40
41 src_prepare()
42 {
43 munpack ${SRCFILE} || die
44 cd ${SRCDIR}
45
46 # fix build against newer xtables API
47 mpatch ${PNAME}-${PVER}-xtables-api-6-fix.patch || die
48
49 # fix cflags
50 sed -i "s:-O2:${CFLAGS}:" Makefile || die
51
52 # fix libdir
53 sed -i "/^LIBDIR/s:=.*:=/$(mlibdir):" Makefile || die
54 }
55
56 src_compile()
57 {
58 cd ${SRCDIR}
59 mmake IPT_LIB_DIR=$(pkg-config xtables --variable=xtlibdir) SBINDIR=/sbin || die
60 }
61
62 src_install()
63 {
64 cd ${SRCDIR}
65 make DESTDIR=${BINDIR} \
66 DOCDIR=/usr/share/doc/${PNAME}-${PVER} \
67 MANDIR=/usr/share/man \
68 SBINDIR=/sbin install || die
69 minstalldocs ABOUT-NLS COPYING README* TODO || die
70 }