From 94549ddd246a5fbf5dd59617a58c50d54b1fa5cd Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 31 May 2006 13:13:48 +0000 Subject: Lots of enhancements to the SlackBuild; and a release upgrade. --- wpa_supplicant/build/wpa_supplicant.SlackBuild | 83 ++++++++++++++++++++------ 1 file changed, 65 insertions(+), 18 deletions(-) (limited to 'wpa_supplicant/build') diff --git a/wpa_supplicant/build/wpa_supplicant.SlackBuild b/wpa_supplicant/build/wpa_supplicant.SlackBuild index b9d39679..a1133b96 100755 --- a/wpa_supplicant/build/wpa_supplicant.SlackBuild +++ b/wpa_supplicant/build/wpa_supplicant.SlackBuild @@ -46,11 +46,15 @@ # 20051014-1: * 14/oct/2005 by Eric Hameleers # Update. # 0.4.7-1: * 31/jan/2006 by Eric Hameleers -# Try a "stable" version for the madwifi-ng (Atheros driver) code. +# Try a "stable" version for the madwifi-ng (Atheros driver) code # Also, get rid of the developer docs. # 0.4.8-1: * 17/feb/2006 by Eric Hameleers # Upgrade. This SlackBuild will now by default delete the # remainders of a previous compile in /tmp/tmp-$PRGNAM/. +# 0.4.9-1: * 31/may/2006 by Eric Hameleers +# Upgrade. This time, build the wpa_gui and man pages too. +# Also, made support for madwifi/hermes/broadcom drivers +# configurable using three *_INCLUDES variables. # # ------------------------------------------------------------------------------ # @@ -72,22 +76,23 @@ fi OFFICIAL_RELEASE="yes" # make empty if you're building from CVS SRCNAM=hostap PRGNAM=wpa_supplicant -VERSION=0.4.8 +VERSION=0.4.9 ARCH=${ARCH:-i486} BUILD=1 -# Support for madwifi needs the madwifi driver's source tree; -# Change this to where _your_ madwifi source directory is -# (the compile will fail if these are not present, sorry...): -# Hack the madwifi support out of 'wpa_supplicant-$VERSION.defconfig -# in this directory if you don't need support for it -#MADWIFI_PATH="/tmp/tmp-madwifi/madwifi" -# Madwifi package for Slackware now installs the headers too: -MADWIFI_PATH="/usr/include/madwifi" - -DOC="ChangeLog COPYING README* doc/html wpa_supplicant-devel.pdf \ +DOC="ChangeLog COPYING README* examples \ wpa_supplicant.conf.sample $CWD/README.slackware" +# Support for some of the wireless drivers needs the header files of those +# drivers. +# Change these *_INCLUDES variables to where _your_ driver include directory +# is located. If any of these directories is found, support for the driver +# will be added to wpa_supplicant. +# My madwifi package for Slackware installs the headers here: +MADWIFI_INCLUDES="/usr/include/madwifi" +HERMES_INCLUDES="" +BROADCOM_INCLUDES="" + if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" @@ -123,6 +128,7 @@ echo "++" # We always erase old package's contents: rm -rf $PKG/* +rm -f $CWD/*.log # Explode the package framework: if [ -e $CWD/_$PRGNAM.tar.gz ]; then @@ -153,13 +159,42 @@ else cd ${PRGNAM}-${VERSION} fi -sed -e "s#\@\@MADWIFI_PATH\@\@#${MADWIFI_PATH}#" \ - $CWD/${PRGNAM}-${VERSION}.defconfig \ - > .config +# Create the configuration file for wpa_supplicant: +cat $CWD/${PRGNAM}-${VERSION}.defconfig > .config +if [ ! -z $MADWIFI_INCLUDES -a -d $MADWIFI_INCLUDES ]; then + echo "Adding madwifi driver (Atheros) support" | tee -a $CWD/configure.log + cat <<-EOT >> .config + CONFIG_DRIVER_MADWIFI=y + CFLAGS += -I${MADWIFI_INCLUDES} + EOT +fi +if [ ! -z $HERMES_INCLUDES -a -d $HERMES_INCLUDES ]; then + echo "Adding hermes driver (Agere) support" | tee -a $CWD/configure.log + cat <<-EOT >> .config + CONFIG_DRIVER_HERMES=y + CFLAGS += -I${HERMES_INCLUDES} + EOT +fi +if [ ! -z $BROADCOM_INCLUDES -a -d $BROADCOM_INCLUDES ]; then + echo "Adding broadcom driver support" | tee -a $CWD/configure.log + cat <<-EOT >> .config + CONFIG_DRIVER_BROADCOM=y + CFLAGS += -I${BROADCOM_INCLUDES} + EOT +fi -chown -R root.root . +chown -R root:root . make 2>&1 | tee $CWD/make.log +# Build the GUI client +make wpa_gui 2>&1 | tee -a $CWD/make.log +# Make man pages if needed +( + cd doc/docbook + if ! ls *.? >/dev/null 2>&1 ; then + make man + fi +) # Do not build the developer docs #PATH=".:$PATH" make docs 2>&1 | tee -a $CWD/make.log @@ -167,9 +202,18 @@ make 2>&1 | tee $CWD/make.log # This goes in the doc directory later on: cp wpa_supplicant.conf wpa_supplicant.conf.sample -mkdir -p $PKG/usr/sbin +# Install binaries +mkdir -p $PKG/usr/sbin $PKG/usr/X11R6/bin cp wpa_supplicant wpa_passphrase wpa_cli $PKG/usr/sbin/ +cp wpa_gui/wpa_gui $PKG/usr/X11R6/bin/ +# Install man pages +for m in 5 8; do + mkdir -p $PKG/usr/man/man${m} + cp doc/docbook/*.${m} $PKG/usr/man/man${m}/ +done + +# Install configuration file mkdir -p $PKG/etc cat <<-_EOT_ > $PKG/etc/wpa_supplicant.conf.new # See /usr/doc/${PRGNAM}-${VERSION}/wpa_supplicant.conf.sample @@ -207,7 +251,6 @@ cat <<-_EOT_ > $PKG/etc/wpa_supplicant.conf.new # Strip binaries and libs, fix ownership: chown -R root:root $PKG -chown root:bin $PKG/usr/sbin/* chmod -R o-w $PKG ( cd $PKG @@ -246,6 +289,10 @@ mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION} cp -a $DOC $PKG/usr/doc/${PRGNAM}-${VERSION} chmod -R a-w $PKG/usr/doc/${PRGNAM}-${VERSION}/* +# Compress the man page(s) +[ -d $PKG/usr/man ] && \ + find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; + # --- PACKAGE DESCRIPTION --- mkdir -p $PKG/install -- cgit v1.2.3-65-gdbad