summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/iproute2
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 18:09:11 (GMT)
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 18:09:57 (GMT)
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity/iproute2
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/iproute2')
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch61
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2.inc27
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb6
3 files changed, 94 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch
new file mode 100644
index 0000000..67dc6f5
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch
@@ -0,0 +1,61 @@
1# borrow from OE, to handle cross compile mess
2#
3# ktian1, 06/28/2010
4Index: iproute2-2.6.34/configure
5===================================================================
6--- iproute2-2.6.34.orig/configure
7+++ iproute2-2.6.34/configure
8@@ -4,7 +4,7 @@
9 INCLUDE=${1:-"$PWD/include"}
10
11 TABLES=
12-
13+SYSROOT=$1
14 check_atm()
15 {
16 cat >/tmp/atmtest.c <<EOF
17@@ -15,7 +15,7 @@ int main(int argc, char **argv) {
18 return 0;
19 }
20 EOF
21-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
22+$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
23 if [ $? -eq 0 ]
24 then
25 echo "TC_CONFIG_ATM:=y" >>Config
26@@ -49,7 +49,7 @@ int main(int argc, char **argv)
27
28 EOF
29
30-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
31+if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
32 then
33 echo "TC_CONFIG_XT:=y" >>Config
34 echo "using xtables"
35@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
36 }
37
38 EOF
39-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
40+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
41
42 if [ $? -eq 0 ]
43 then
44@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
45 }
46
47 EOF
48-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
49+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
50
51 if [ $? -eq 0 ]
52 then
53@@ -150,7 +150,7 @@ check_ipt()
54 check_ipt_lib_dir()
55 {
56 IPT_LIB_DIR=""
57- for dir in /lib /usr/lib /usr/local/lib
58+ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
59 do
60 for file in $dir/$TABLES/lib*t_*so ; do
61 if [ -f $file ]; then
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
new file mode 100644
index 0000000..7246b87
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -0,0 +1,27 @@
1DESCRIPTION = "kernel routing and traffic control utilities"
2HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
3SECTION = "base"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
6 file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93"
7DEPENDS = "flex-native bison-native"
8
9inherit update-alternatives
10
11EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin"
12
13do_install () {
14 oe_runmake DESTDIR=${D} install
15 mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
16 install -d ${D}${datadir}
17 mv ${D}/share/* ${D}${datadir}/ || true
18 rm ${D}/share -rf || true
19}
20
21FILES_${PN} += "/usr/lib/tc/*"
22FILES_${PN}-dbg += "/usr/lib/tc/.debug"
23
24ALTERNATIVE_NAME = "ip"
25ALTERNATIVE_PATH = "${base_sbindir}/ip.iproute2"
26ALTERNATIVE_LINK = "${base_bindir}/ip"
27ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb
new file mode 100644
index 0000000..c5e0ef6
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb
@@ -0,0 +1,6 @@
1require iproute2.inc
2
3PR = "r0"
4
5SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
6 file://configure-cross.patch"