Magellan Linux

Contents of /branches/R11-stable/core/iproute2/iproute2-3.8.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17009 - (show annotations) (download)
Thu Apr 4 15:35:05 2013 UTC (11 years, 2 months ago) by niro
File size: 1581 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="iproute2"
4 PVER="3.8.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 >= dev-libs/libnl-1.1
18 >= virtual/sed"
19
20 PROVIDE="virtual/iproute2"
21
22 # get the right pver
23 if [[ ${PVER} != ${PVER%.*.*.*} ]]
24 then
25 MYPVER="${PVER%.*}-${PVER##*.}"
26 else
27 MYPVER="${PVER}"
28 fi
29
30 SRCFILE="${PNAME}-${MYPVER}.tar.xz"
31 SRCDIR="${BUILDDIR}/${PNAME}-${MYPVER}"
32
33 sminclude mbuild
34 msetfeature "!check"
35
36 SRC_URI=(
37 http://www.kernel.org/pub/linux/utils/net/${PNAME}/${SRCFILE}
38 http://devresources.linux-foundation.org/dev/${PNAME}/download/${SRCFILE}
39 http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE}
40 mirror://${PNAME}/${SRCFILE}
41 )
42
43 UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/utils/net/${PNAME}/?C=M;O=A' | lasttarball xz"
44
45 src_prepare()
46 {
47 munpack ${SRCFILE} || die
48 cd ${SRCDIR}
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 \
61 IPT_LIB_DIR=$(pkg-config xtables --variable=xtlibdir) \
62 SBINDIR=/usr/sbin \
63 LIBDIR=/usr/$(mlibdir) \
64 || die
65 }
66
67 src_install()
68 {
69 cd ${SRCDIR}
70 make DESTDIR=${BINDIR} \
71 DOCDIR=/usr/share/doc/${PNAME}-${PVER} \
72 MANDIR=/usr/share/man \
73 SBINDIR=/usr/sbin \
74 LIBDIR=/usr/$(mlibdir) \
75 install || die
76 minstalldocs ABOUT-NLS COPYING README* TODO || die
77 }