From c8be49dd2c5d183f4bafc653b1786eb72fe91f69 Mon Sep 17 00:00:00 2001 From: Jose V Beneyto Date: Thu, 2 Dec 2010 09:27:48 +0100 Subject: [PATCH] iw: initial import (verified compilation) --- iw/.footprint | 6 ++++ iw/.md5sum | 3 ++ iw/Pkgfile | 23 ++++++++++++++ iw/iw-0.9.20-cross_compile.patch | 52 ++++++++++++++++++++++++++++++++ iw/version.sh | 6 ++++ 5 files changed, 90 insertions(+) create mode 100644 iw/.footprint create mode 100644 iw/.md5sum create mode 100644 iw/Pkgfile create mode 100644 iw/iw-0.9.20-cross_compile.patch create mode 100644 iw/version.sh diff --git a/iw/.footprint b/iw/.footprint new file mode 100644 index 0000000..d168876 --- /dev/null +++ b/iw/.footprint @@ -0,0 +1,6 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man8/ +-rw-r--r-- root/root usr/man/man8/iw.8.gz +drwxr-xr-x root/root usr/sbin/ +-rwxr-xr-x root/root usr/sbin/iw diff --git a/iw/.md5sum b/iw/.md5sum new file mode 100644 index 0000000..204d14d --- /dev/null +++ b/iw/.md5sum @@ -0,0 +1,3 @@ +134325b5121736b27ca1348a4b44685d iw-0.9.20-cross_compile.patch +1055799b544b3e08169d155bb6c21bb0 iw-0.9.20.tar.bz2 +cb87c326d0cff9bafafa6b0ddc233446 version.sh diff --git a/iw/Pkgfile b/iw/Pkgfile new file mode 100644 index 0000000..2060b31 --- /dev/null +++ b/iw/Pkgfile @@ -0,0 +1,23 @@ +# Description: nl80211 based CLI configuration utility for wireless devices +# URL: http://wireless.kernel.org/en/users/Documentation/iw +# Maintainer: Bartlomiej Palmowski, rotwang at crux dot org dot pl +# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu +# Depends on: libnl + +name=iw +version=0.9.20 +release=1 +source=(http://wireless.kernel.org/download/$name/$name-$version.tar.bz2 \ + version.sh $name-$version-cross_compile.patch) + +build() { + cd $name-$version + + sed "s/#VER#/$version/" ../version.sh > version.sh + patch -p1 -i $SRC/$name-$version-cross_compile.patch + + make CC="$CC" CFLAGS="$CFLAGS" + make install \ + MANDIR=/usr/man \ + DESTDIR=$PKG +} diff --git a/iw/iw-0.9.20-cross_compile.patch b/iw/iw-0.9.20-cross_compile.patch new file mode 100644 index 0000000..0deb59b --- /dev/null +++ b/iw/iw-0.9.20-cross_compile.patch @@ -0,0 +1,52 @@ +diff -purN iw-0.9.20.orig/Makefile iw-0.9.20/Makefile +--- iw-0.9.20.orig/Makefile 2010-12-02 08:13:30.000000000 +0000 ++++ iw-0.9.20/Makefile 2010-12-02 08:17:58.000000000 +0000 +@@ -19,27 +19,11 @@ OBJS = iw.o genl.o event.o info.o phy.o + mesh.o mpath.o scan.o reg.o version.o \ + reason.o status.o connect.o link.o offch.o ps.o cqm.o + OBJS += sections.o +-ALL = iw + +-NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y) +-NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y) +- +-ifeq ($(NL1FOUND),Y) + NLLIBNAME = libnl-1 +-endif +- +-ifeq ($(NL2FOUND),Y) +-CFLAGS += -DCONFIG_LIBNL20 +-LIBS += -lnl-genl +-NLLIBNAME = libnl-2.0 +-endif +- +-ifeq ($(NLLIBNAME),) +-$(error Cannot find development files for any supported version of libnl) +-endif + +-LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME)) +-CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME)) ++LIBS += -lnl ++CFLAGS += + + ifeq ($(V),1) + Q= +@@ -49,17 +33,7 @@ Q=@ + NQ=echo + endif + +-all: version_check $(ALL) +- +-version_check: +-ifeq ($(NL2FOUND),Y) +-else +-ifeq ($(NL1FOUND),Y) +-else +- $(error No libnl found) +-endif +-endif +- ++all: iw + + VERSION_OBJS := $(filter-out version.o, $(OBJS)) + diff --git a/iw/version.sh b/iw/version.sh new file mode 100644 index 0000000..fb55f3b --- /dev/null +++ b/iw/version.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +VERSION="#VER#" +OUT="$1" + +echo "const char iw_version[] = \"$VERSION\";" > "$OUT" -- 2.26.2