/[gentoo-x86]/sys-apps/iproute2/iproute2-3.1.0.ebuild
Gentoo

Contents of /sys-apps/iproute2/iproute2-3.1.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sat Dec 3 10:28:48 2011 UTC (17 months, 2 weeks ago) by vapier
Branch: MAIN
Changes since 1.1: +2 -2 lines
Update SRC_URI #392987 by Azamat H. Hackimov.

(Portage version: 2.2.0_alpha75/cvs/Linux x86_64)

1 vapier 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.2 # $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-3.1.0.ebuild,v 1.1 2011/12/02 22:24:35 vapier Exp $
4 vapier 1.1
5     EAPI=4
6    
7     EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
8    
9     if [[ ${PV} == *.*.*.* ]] ; then
10     MY_PV=${PV%.*}-${PV##*.}
11     else
12     MY_PV=${PV}
13     fi
14     MY_P="${PN}-${MY_PV}"
15    
16     inherit eutils toolchain-funcs flag-o-matic
17     [[ ${PV} == "9999" ]] && inherit git-2
18    
19     DESCRIPTION="kernel routing and traffic control utilities"
20     HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
21 vapier 1.2 [[ ${PV} == "9999" ]] || SRC_URI="mirror://kernel/linux/utils/net/${PN}/${P}.tar.bz2"
22 vapier 1.1
23     LICENSE="GPL-2"
24     SLOT="0"
25     [[ ${PV} == "9999" ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
26     IUSE="atm berkdb minimal"
27    
28     RDEPEND="!net-misc/arpd
29     !minimal? ( berkdb? ( sys-libs/db ) )
30     atm? ( net-dialup/linux-atm )"
31     DEPEND="${RDEPEND}
32     sys-devel/bison
33     sys-devel/flex
34     >=sys-kernel/linux-headers-2.6.27
35     elibc_glibc? ( >=sys-libs/glibc-2.7 )"
36    
37     S=${WORKDIR}/${MY_P}
38    
39     src_prepare() {
40     epatch "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
41    
42     sed -i \
43     -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
44     -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
45     Makefile || die
46    
47     # build against system headers
48     rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
49    
50     # don't build arpd if USE=-berkdb #81660
51     use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
52    
53     use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
54     }
55    
56     src_configure() {
57     tc-export AR CC PKG_CONFIG
58    
59     # This sure is ugly. Should probably move into toolchain-funcs at some point.
60     local setns
61     pushd "${T}" >/dev/null
62     echo 'main(){return setns();};' > test.c
63     ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
64     popd >/dev/null
65    
66     cat <<-EOF > Config
67     TC_CONFIG_ATM := $(usex atm y n)
68     IP_CONFIG_SETNS := ${setns}
69     # Use correct iptables dir, #144265 #293709
70     IPT_LIB_DIR := $(${PKG_CONFIG} xtables --variable=xtlibdir)
71     EOF
72     }
73    
74     src_install() {
75     if use minimal ; then
76     into /
77     dosbin tc/tc
78     return 0
79     fi
80    
81     emake \
82     DESTDIR="${D}" \
83     SBINDIR=/sbin \
84     DOCDIR=/usr/share/doc/${PF} \
85     MANDIR=/usr/share/man \
86     install
87    
88     dolib.a lib/libnetlink.a
89     insinto /usr/include
90     doins include/libnetlink.h
91    
92     if use berkdb ; then
93     dodir /var/lib/arpd
94     # bug 47482, arpd doesn't need to be in /sbin
95     dodir /usr/sbin
96     mv "${ED}"/sbin/arpd "${ED}"/usr/sbin/
97     fi
98     }

  ViewVC Help
Powered by ViewVC 1.1.13