aboutsummaryrefslogtreecommitdiffstats
path: root/build_release
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2007-03-25 21:41:10 (GMT)
committerJouni Malinen <j@w1.fi>2007-03-25 21:41:10 (GMT)
commitb68436d248d789aa79570c44ef7cad62fb531535 (patch)
treedab710f6dee3ebdfaf700a5a11ae4995d2550ed7 /build_release
parent0a066a67415543c3ea5cb3a12b1c6df9b57f1145 (diff)
downloadhostap-history-b68436d248d789aa79570c44ef7cad62fb531535.zip
hostap-history-b68436d248d789aa79570c44ef7cad62fb531535.tar.gz
hostap-history-b68436d248d789aa79570c44ef7cad62fb531535.tar.bz2
Renamed build_gpl_release to build_release since the "gpl_" part was only
a historic relic from Host AP driver times. Both wpa_supplicant and hostapd are released under dual-license (GPLv2/BSD).
Diffstat (limited to 'build_release')
-rwxr-xr-xbuild_release154
1 files changed, 154 insertions, 0 deletions
diff --git a/build_release b/build_release
new file mode 100755
index 0000000..b2d5b11
--- /dev/null
+++ b/build_release
@@ -0,0 +1,154 @@
+#!/bin/sh
+
+# Path to the Windows cross compiler (mingw)
+WINCROSS=/opt/xmingw/bin
+WINLOCAL=/home/jm/H-win/local
+QT4HOSTBIN=/q/jm/qt4/bin
+
+set -e
+
+if [ -z "$1" ]; then
+ echo "build_release <version> [nobin]"
+ exit 1
+fi
+
+TMP=tmp.build_release
+RELDIR=`pwd`/Release
+VER=$1
+NOW=`date +%Y-%m-%d`
+DIR=hostap-$VER
+
+if [ -r $TMP ]; then
+ echo "Temporary directory '$TMP' exists. Remove it before running this."
+ exit 1
+fi
+
+mkdir $TMP
+cg-export "$TMP/$DIR"
+cd "$TMP/$DIR"
+
+echo "Version: $VER - $NOW"
+
+DATEw=`head -n 3 wpa_supplicant/ChangeLog | tail -n 1 | sed "s/ .*//"`
+DATEh=`head -n 3 hostapd/ChangeLog | tail -n 1 | sed "s/ .*//"`
+
+if [ "$DATEw" != "$NOW" -o "$DATEh" != "$NOW" ]; then
+ echo "NOTE! Date mismatch in ChangeLog: wpa_supplicant $DATEw hostapd $DATEh != $NOW"
+fi
+
+cd ..
+mkdir -p $RELDIR
+
+# New style tarballs
+mv $DIR/wpa_supplicant wpa_supplicant-$VER
+cp $DIR/COPYING wpa_supplicant-$VER
+cd wpa_supplicant-$VER
+cat Makefile | sed "s%../hostapd/%%g" > Makefile.tmp
+mv -f Makefile.tmp Makefile
+cat wpa_gui/wpa_gui.pro | sed "s%../hostapd/%%g" > wpa_gui.pro.tmp
+mv -f wpa_gui.pro.tmp wpa_gui/wpa_gui.pro
+cat wpa_gui-qt4/wpa_gui.pro | sed "s%../hostapd/%%g" > wpa_gui.pro.tmp
+mv -f wpa_gui.pro.tmp wpa_gui-qt4/wpa_gui.pro
+cd doc/docbook
+make man
+rm -f manpage.links manpage.refs
+cd ../../..
+tar czf $RELDIR/wpa_supplicant-$VER.tar.gz wpa_supplicant-$VER
+
+mv $DIR/hostapd hostapd-$VER
+cp $DIR/COPYING hostapd-$VER
+tar czf $RELDIR/hostapd-$VER.tar.gz hostapd-$VER
+
+cd ..
+rm -r $TMP
+
+if [ "$2" == "nobin" ]; then
+ exit 0
+fi
+
+if [ -d $WINCROSS ]; then
+ pushd $RELDIR
+
+ PDIR=wpa_supplicant-$VER
+ WDIR=wpa_supplicant-windows-bin-$VER
+ tar xzf $PDIR.tar.gz
+ mkdir "$WDIR"
+ cd "$PDIR"
+ cat > .config <<EOF
+CONFIG_DRIVER_NDIS=y
+CONFIG_NATIVE_WINDOWS=y
+
+CFLAGS += -I/opt/xmingw/i386-mingw32msvc/include/ddk
+CC=i386-mingw32msvc-gcc
+STRIP=i386-mingw32msvc-strip
+PLATFORMSDKLIB=$WINLOCAL/lib
+CONFIG_NDIS_EVENTS_INTEGRATED=y
+
+CFLAGS += -I$WINLOCAL/include
+LIBS += -L$WINLOCAL/lib
+LIBS_w += -L$WINLOCAL/lib
+LIBS_p += -L$WINLOCAL/lib
+
+CONFIG_EAP_SIM=y
+CONFIG_EAP_AKA=y
+CONFIG_EAP_LEAP=y
+CONFIG_EAP_FAST=y
+CONFIG_EAP_TLS=y
+
+CONFIG_CTRL_IFACE=y
+CONFIG_EAP_FAST=y
+CONFIG_EAP_MSCHAPV2=y
+CONFIG_EAP_TTLS=y
+CONFIG_EAP_PEAP=y
+CONFIG_EAP_MD5=y
+CONFIG_EAP_GTC=y
+CONFIG_EAP_OTP=y
+CONFIG_EAP_PAX=y
+CONFIG_EAP_SAKE=y
+CONFIG_EAP_PSK=y
+CONFIG_PKCS12=y
+CONFIG_PCSC=y
+
+CONFIG_L2_PACKET=winpcap
+CONFIG_MAIN=main_winsvc
+CONFIG_BACKEND=winreg
+CONFIG_ELOOP=eloop_win
+CFLAGS += -DCONFIG_DEBUG_FILE
+EOF
+
+ # First, build the Windows service & registry version and rename it
+ PATH=$PATH:$WINCROSS make windows-bin
+ mv wpa_supplicant.exe wpasvc.exe
+
+ # Then, build "the standard" wpa_supplicant.exe
+ cat >> .config <<EOF
+CONFIG_MAIN=main
+CONFIG_BACKEND=file
+EOF
+
+ PATH=$PATH:$WINCROSS make windows-bin
+
+ for i in COPYING README README-Windows.txt wpa_supplicant.conf; do
+ unix2dos < $i > ../"$WDIR"/$i
+ done
+ mv *.exe ../"$WDIR"
+ cp win_example.reg ../"$WDIR"
+
+ cd wpa_gui
+ PATH=$QT4HOSTBIN:$PATH:$WINCROSS ./setup-mingw-cross-compiling
+ PATH=$QT4HOSTBIN:$PATH:$WINCROSS make
+ cp release/wpa_gui.exe ../../"$WDIR"
+ cd ..
+
+ cd ..
+ rm -rf "$PDIR"
+ zip "$WDIR.zip" "$WDIR"/*
+ rm -rf "$WDIR"
+
+ popd
+fi
+
+ls -l $RELDIR/*$VER*
+
+
+exit 0