summaryrefslogtreecommitdiff
path: root/meta/recipes-connectivity/wireless-tools
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-connectivity/wireless-tools
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadopenembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.bz2
openembedded-core-29d6678fd546377459ef75cf54abeef5b969b5cf.zip
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/wireless-tools')
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch13
-rwxr-xr-xmeta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up122
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up34
-rw-r--r--meta/recipes-connectivity/wireless-tools/wireless-tools_29.bb51
4 files changed, 220 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch
new file mode 100644
index 0000000000..fd8cf42773
--- /dev/null
+++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch
@@ -0,0 +1,13 @@
+--- wireless_tools.26/Makefile.orig 2003-06-18 03:38:58.000000000 +0200
++++ wireless_tools.26/Makefile 2004-07-03 23:35:29.000000000 +0200
+@@ -57,8 +57,8 @@
+ # Install directories
+ INSTALL_DIR= $(PREFIX)/sbin/
+ INSTALL_LIB= $(PREFIX)/lib/
+-INSTALL_INC= $(PREFIX)/include/
+-INSTALL_MAN= $(PREFIX)/man/
++INSTALL_INC= $(PREFIX)/usr/include/
++INSTALL_MAN= $(PREFIX)/usr/share/man/
+
+ # Use local header if the version of wireless extensions is specified
+ ifdef FORCE_WEXT_VERSION
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up b/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up
new file mode 100755
index 0000000000..2518a5c834
--- /dev/null
+++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+case "$METHOD" in loopback) exit 0 ;; esac
+
+IWCONFIG=/sbin/iwconfig
+IWPRIV=/sbin/iwpriv
+
+if [ ! -x $IWCONFIG ]; then
+ exit 0
+fi
+
+# Detect and do nothing for linux-wlan-ng interfaces;
+# which are configured by thier own if-pre-up script.
+if [ -n "$IF_WIRELESS_TYPE" -a "$IF_WIRELESS_TYPE" = "wlan-ng" ]; then
+ exit 0
+fi
+
+if [ -n "$IF_NEEDS_RESET" ]; then
+ $IWPRIV "$IFACE" reset 1
+ sleep 1
+fi
+
+if [ -n "$IF_NEEDS_FIRMWARE" ]; then
+ $IF_NEEDS_FIRMWARE "$IFACE"
+fi
+
+if [ -n "$IF_WIRELESS_SENS" ]; then
+ $IWCONFIG "$IFACE" sens $IF_WIRELESS_SENS
+fi
+
+if [ -n "$IF_WIRELESS_RATE" ]; then
+ $IWCONFIG "$IFACE" rate $IF_WIRELESS_RATE
+fi
+
+if [ -n "$IF_WIRELESS_RTS" ]; then
+ $IWCONFIG "$IFACE" rts $IF_WIRELESS_RTS
+fi
+
+if [ -n "$IF_WIRELESS_FRAG" ]; then
+ $IWCONFIG "$IFACE" frag $IF_WIRELESS_FRAG
+fi
+
+if [ -n "$IF_WIRELESS_POWER" ]; then
+ $IWCONFIG "$IFACE" power $IF_WIRELESS_POWER
+fi
+
+if [ -n "$IF_WIRELESS_POWERPERIOD" ]; then
+ $IWCONFIG "$IFACE" power period $IF_WIRELESS_POWERPERIOD
+fi
+
+if [ -n "$IF_WIRELESS_POWERTIMEOUT" ]; then
+ $IWCONFIG "$IFACE" power timeout $IF_WIRELESS_POWERTIMEOUT
+fi
+
+if [ -n "$IF_WIRELESS_TXPOWER" ]; then
+ $IWCONFIG "$IFACE" txpower $IF_WIRELESS_TXPOWER
+fi
+
+if [ -n "$IF_WIRELESS_RETRY" ]; then
+ $IWCONFIG "$IFACE" retry $IF_WIRELESS_RETRY
+fi
+
+if [ -n "$IF_WIRELESS_NICK" ]; then
+ $IWCONFIG "$IFACE" nick "$IF_WIRELESS_NICK"
+fi
+
+if [ -n "$IF_WIRELESS_NWID" ]; then
+ $IWCONFIG "$IFACE" nwid "$IF_WIRELESS_NWID"
+fi
+
+if [ -n "$IF_WIRELESS_ENC" ]; then
+ eval $IWCONFIG "$IFACE" enc $IF_WIRELESS_ENC
+fi
+
+if [ -n "$IF_WIRELESS_KEY" ]; then
+ eval $IWCONFIG "$IFACE" key $IF_WIRELESS_KEY
+fi
+
+if [ -n "$IF_WIRELESS_KEY1" ]; then
+ $IWCONFIG "$IFACE" key [1] "$IF_WIRELESS_KEY1"
+fi
+
+if [ -n "$IF_WIRELESS_KEY2" ]; then
+ $IWCONFIG "$IFACE" key [2] "$IF_WIRELESS_KEY2"
+fi
+
+if [ -n "$IF_WIRELESS_KEY3" ]; then
+ $IWCONFIG "$IFACE" key [3] "$IF_WIRELESS_KEY3"
+fi
+
+if [ -n "$IF_WIRELESS_KEY4" ]; then
+ $IWCONFIG "$IFACE" key [4] "$IF_WIRELESS_KEY4"
+fi
+
+if [ -n "$IF_WIRELESS_DEFAULTKEY" ]; then
+ $IWCONFIG "$IFACE" key ["$IF_WIRELESS_DEFAULTKEY"]
+fi
+
+if [ -n "$IF_WIRELESS_KEYMODE" ]; then
+ $IWCONFIG "$IFACE" key "$IF_WIRELESS_KEYMODE"
+fi
+
+if [ -n "$IF_WIRELESS_MODE" ]; then
+ $IWCONFIG "$IFACE" mode $IF_WIRELESS_MODE
+fi
+
+if [ -n "$IF_WIRELESS_FREQ" ]; then
+ $IWCONFIG "$IFACE" freq $IF_WIRELESS_FREQ
+fi
+
+if [ -n "$IF_WIRELESS_CHANNEL" ]; then
+ $IWCONFIG "$IFACE" channel $IF_WIRELESS_CHANNEL
+fi
+
+if [ -n "$IF_WIRELESS_ESSID" ]; then
+ $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID"
+fi
+
+if [ -n "$IF_WIRELESS_COMMIT" ]; then
+ $IWCONFIG "$IFACE" commit
+fi
+
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up b/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
new file mode 100644
index 0000000000..4c8e95bf2a
--- /dev/null
+++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# /etc/network/if-pre-up.d/zzz-wireless
+# by Stefan Tomanek (stefan@pico.ruhr.de)
+
+
+IWCONFIG=/sbin/iwconfig
+IFCONFIG=/sbin/ifconfig
+GREP=/bin/grep
+LOGGER=/usr/bin/logger
+SLEEP=/bin/sleep
+
+# How long do we wait for association?
+RETRIES=15
+SLEEPTIME=1
+
+# Only sleep if we use DHCP (add others methods seperated by spaces)
+ONLY_FOR="static dhcp"
+
+if [ -z "$IF_WIRELESS_TYPE" ] && echo "$ONLY_FOR" | grep -q "$METHOD" ; then
+ $IFCONFIG $IFACE up
+ $LOGGER Checking for WLAN association...
+ while ( [ $RETRIES -gt 0 ] && ($IWCONFIG "$IFACE" | $GREP -q "Access Point: Not-Associated") ); do
+ $LOGGER No association yet, $RETRIES retries until timeout
+ RETRIES=$(($RETRIES-1))
+ $SLEEP $SLEEPTIME
+ done
+
+ if [ $RETRIES -eq 0 ]; then
+ $LOGGER Timeout waiting for association, continuing anyway...
+ else
+ $LOGGER Found association!
+ fi
+fi
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools_29.bb b/meta/recipes-connectivity/wireless-tools/wireless-tools_29.bb
new file mode 100644
index 0000000000..6bb1193c65
--- /dev/null
+++ b/meta/recipes-connectivity/wireless-tools/wireless-tools_29.bb
@@ -0,0 +1,51 @@
+DESCRIPTION = "Tools for the Linux Standard Wireless Extension Subsystem"
+HOMEPAGE = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
+LICENSE = "GPLv2 & (LGPL | MPL | BSD)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://iwconfig.c;beginline=1;endline=12;md5=cf710eb1795c376eb10ea4ff04649caf \
+ file://iwevent.c;beginline=59;endline=72;md5=d66a10026d4394f0a5b1c5587bce4537 \
+ file://sample_enc.c;beginline=1;endline=4;md5=838372be07874260b566bae2f6ed33b6"
+SECTION = "base"
+PRIORITY = "optional"
+PE = "1"
+PR = "r1"
+
+SRC_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.tar.gz \
+ file://man.patch;apply=yes \
+ file://wireless-tools.if-pre-up \
+ file://zzz-wireless.if-pre-up"
+S = "${WORKDIR}/wireless_tools.29"
+
+CFLAGS =+ "-I${S}"
+EXTRA_OEMAKE = "-e 'BUILD_SHARED=y' \
+ 'INSTALL_DIR=${D}${base_sbindir}' \
+ 'INSTALL_LIB=${D}${libdir}' \
+ 'INSTALL_INC=${D}${includedir}' \
+ 'INSTALL_MAN=${D}${mandir}'"
+
+do_compile() {
+ oe_runmake all libiw.a
+}
+
+do_install() {
+ oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
+ install -d ${D}${sbindir}
+ install -m 0755 ifrename ${D}${sbindir}/ifrename
+ # Disabled by RP - 20/8/08 - We don't seem to need/use these
+ #install -d ${D}${sysconfdir}/network/if-pre-up.d
+ #install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
+ #install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
+}
+
+PACKAGES = "libiw-dbg ifrename-dbg ${PN}-dbg \
+libiw libiw-dev libiw-doc ifrename-doc ifrename ${PN} ${PN}-doc"
+
+FILES_libiw-dbg = "${libdir}/.debug/*.so.*"
+FILES_ifrename-dbg = "${sbindir}/.debug/ifrename"
+FILES_libiw = "${libdir}/*.so.*"
+FILES_libiw-dev = "${libdir}/*.a ${libdir}/*.so ${includedir}"
+FILES_libiw-doc = "${mandir}/man7"
+FILES_ifrename = "${sbindir}/ifrename"
+FILES_ifrename-doc = "${mandir}/man8/ifrename.8 ${mandir}/man5/iftab.5"
+FILES_${PN} = "${bindir} ${sbindir}/iw* ${base_sbindir} ${base_bindir} ${sysconfdir}/network"
+FILES_${PN}-doc = "${mandir}"