Magellan Linux

Annotation of /trunk/core/iproute2/iproute2-3.4.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12753 - (hide annotations) (download)
Mon Jul 2 14:37:15 2012 UTC (11 years, 11 months ago) by niro
File size: 1573 byte(s)
-marked unstable
1 niro 12676 # $Id$
2    
3     PNAME="iproute2"
4     PVER="3.4.0"
5     PBUILD="r2"
6    
7     PCAT="sys-apps"
8 niro 12753 STATE="unstable"
9 niro 12676
10     DESCRIPTION="Collection of utilities for controlling TCP/IP networking and Traffic Control."
11     HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2"
12    
13     # arpd needs db
14     DEPEND=">= dev-db/db-5.3
15     >= net-misc/iptables-1.4"
16    
17     SDEPEND=">= virtual/kernel-headers
18     >= dev-libs/libnl-1.1
19     >= sys-apps/sed-4"
20    
21     # get the right pver
22     if [[ ${PVER} != ${PVER%.*.*.*} ]]
23     then
24     MYPVER="${PVER%.*}-${PVER##*.}"
25     else
26     MYPVER="${PVER}"
27     fi
28    
29     SRCFILE="${PNAME}-${MYPVER}.tar.xz"
30     SRCDIR="${BUILDDIR}/${PNAME}-${MYPVER}"
31    
32     sminclude mbuild
33     msetfeature "!check"
34    
35     SRC_URI=(
36     http://www.kernel.org/pub/linux/utils/net/${PNAME}/${SRCFILE}
37     http://devresources.linux-foundation.org/dev/${PNAME}/download/${SRCFILE}
38     http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE}
39     mirror://${PNAME}/${SRCFILE}
40     )
41    
42     UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/utils/net/${PNAME}/?C=M;O=A' | lasttarball xz"
43    
44     src_prepare()
45     {
46     munpack ${SRCFILE} || die
47     cd ${SRCDIR}
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 niro 12677 mmake \
60     IPT_LIB_DIR=$(pkg-config xtables --variable=xtlibdir) \
61     SBINDIR=/usr/sbin \
62     LIBDIR=/usr/$(mlibdir) \
63     || die
64 niro 12676 }
65    
66     src_install()
67     {
68     cd ${SRCDIR}
69     make DESTDIR=${BINDIR} \
70     DOCDIR=/usr/share/doc/${PNAME}-${PVER} \
71     MANDIR=/usr/share/man \
72 niro 12677 SBINDIR=/usr/sbin \
73     LIBDIR=/usr/$(mlibdir) \
74 niro 12676 install || die
75     minstalldocs ABOUT-NLS COPYING README* TODO || die
76     }