Build TNC-enabled wpa_supplicant
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 22 Mar 2013 09:33:39 +0000 (10:33 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 22 Mar 2013 09:33:39 +0000 (10:33 +0100)
testing/scripts/recipes/012_wpa_supplicant.mk [new file with mode: 0644]
testing/scripts/recipes/patches/wpa_supplicant-eap-tnc [new file with mode: 0644]

diff --git a/testing/scripts/recipes/012_wpa_supplicant.mk b/testing/scripts/recipes/012_wpa_supplicant.mk
new file mode 100644 (file)
index 0000000..14b64ea
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/make
+
+PV  = 2.0
+PKG = wpa_supplicant-$(PV)
+TAR = $(PKG).tar.gz
+SRC = http://hostap.epitest.fi/releases/$(TAR)
+
+NUM_CPUS := $(shell getconf _NPROCESSORS_ONLN)
+
+CONFIG_OPTS =
+
+PATCHES = \
+       wpa_supplicant-eap-tnc
+
+SUBDIR = wpa_supplicant
+
+all: install
+
+$(TAR):
+       wget $(SRC)
+
+.$(PKG)-unpacked: $(TAR)
+       tar xfz $(TAR)
+       @touch $@
+
+.$(PKG)-patches-applied: .$(PKG)-unpacked
+       cd $(PKG) && cat $(addprefix ../patches/, $(PATCHES)) | patch -p1
+       @touch $@
+
+.$(PKG)-configured: .$(PKG)-patches-applied
+       cp $(PKG)/$(SUBDIR)/defconfig $(PKG)/$(SUBDIR)/.config
+       @touch $@
+
+.$(PKG)-built: .$(PKG)-configured
+       cd $(PKG)/$(SUBDIR) && make -j $(NUM_CPUS)
+       @touch $@
+
+install: .$(PKG)-built
+       cd $(PKG)/$(SUBDIR) && make install
diff --git a/testing/scripts/recipes/patches/wpa_supplicant-eap-tnc b/testing/scripts/recipes/patches/wpa_supplicant-eap-tnc
new file mode 100644 (file)
index 0000000..6767d8a
--- /dev/null
@@ -0,0 +1,35 @@
+diff -urN wpa_supplicant-2.0/wpa_supplicant/defconfig wpa_supplicant-2.0-patched/wpa_supplicant/defconfig
+--- wpa_supplicant-2.0/wpa_supplicant/defconfig        2013-01-12 16:42:53.000000000 +0100
++++ wpa_supplicant-2.0-patched/wpa_supplicant/defconfig        2013-03-11 10:19:58.012981151 +0100
+@@ -86,7 +86,7 @@
+ CONFIG_DRIVER_WEXT=y
+ # Driver interface for Linux drivers using the nl80211 kernel interface
+-CONFIG_DRIVER_NL80211=y
++#CONFIG_DRIVER_NL80211=y
+ # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
+ #CONFIG_DRIVER_BSD=y
+@@ -193,7 +193,7 @@
+ #CONFIG_EAP_GPSK_SHA256=y
+ # EAP-TNC and related Trusted Network Connect support (experimental)
+-#CONFIG_EAP_TNC=y
++CONFIG_EAP_TNC=y
+ # Wi-Fi Protected Setup (WPS)
+ #CONFIG_WPS=y
+diff -urN wpa_supplicant-2.0/wpa_supplicant/Makefile wpa_supplicant-2.0-patched/wpa_supplicant/Makefile
+--- wpa_supplicant-2.0/wpa_supplicant/Makefile 2013-01-12 16:42:53.000000000 +0100
++++ wpa_supplicant-2.0-patched/wpa_supplicant/Makefile 2013-03-11 10:38:03.020998741 +0100
+@@ -6,8 +6,8 @@
+ CFLAGS = -MMD -O2 -Wall -g
+ endif
+-export LIBDIR ?= /usr/local/lib/
+-export BINDIR ?= /usr/local/sbin/
++export LIBDIR ?= /usr/lib/
++export BINDIR ?= /usr/sbin/
+ PKG_CONFIG ?= pkg-config
+ CFLAGS += -I../src