diff options
author | Eric Hameleers <alien@slackware.com> | 2005-08-06 20:53:31 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2005-08-06 20:53:31 +0000 |
commit | ac130e81c31fb1fece4099c3f789eba6164a6280 (patch) | |
tree | ffe7f6737db7f3f5007f208b32d80a1678a215bc /wpa_supplicant/build | |
parent | 3de9e310a147a4f2a0d96ccd51bb88a81a8981c0 (diff) | |
download | asb-ac130e81c31fb1fece4099c3f789eba6164a6280.tar.gz asb-ac130e81c31fb1fece4099c3f789eba6164a6280.tar.xz |
Re-written for 20050806 snapshot (the wpa_supplicant binary will show that
number, too).
Diffstat (limited to 'wpa_supplicant/build')
-rwxr-xr-x | wpa_supplicant/build/wpa_supplicant.SlackBuild | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/wpa_supplicant/build/wpa_supplicant.SlackBuild b/wpa_supplicant/build/wpa_supplicant.SlackBuild index 71983a7a..bcbe11aa 100755 --- a/wpa_supplicant/build/wpa_supplicant.SlackBuild +++ b/wpa_supplicant/build/wpa_supplicant.SlackBuild @@ -21,6 +21,9 @@ # Switched from 'stable' to 'development'. # The development branch has support for the 'any' ESSID, needed # to connect to 'any open' WiFi network (think: hotel/airport). +# 20050806-1: * 03/aug/2005 by Eric Hameleers +# New snapshot, uses a madwifi-20050806 snapshot. +# Make snapshot version visible in the program output. # # ------------------------------------------------------------------------------ # @@ -41,7 +44,7 @@ fi SRCNAM=hostap PRGNAM=wpa_supplicant -VERSION=20050415 +VERSION=20050806 ARCH=${ARCH:-i486} BUILD=1 @@ -50,7 +53,7 @@ BUILD=1 # (the compile will fail if these are not present, sorry...): MADWIFI_PATH="/tmp/tmp-madwifi/madwifi" -DOC="ChangeLog COPYING README doc/* wpa_supplicant.conf.sample \ +DOC="ChangeLog COPYING README* doc/* wpa_supplicant.conf.sample \ $CWD/README.slackware" if [ "$ARCH" = "i386" ]; then @@ -88,26 +91,27 @@ cd $TMP/tmp-$PRGNAM # Extract the source archive, patch and modify # tar -xzvf $CWD/${SRCNAM}-${VERSION}.tar.gz -cd ${SRCNAM}-${VERSION}/wpa_supplicant +cd ${SRCNAM}-${VERSION}/${PRGNAM} -sed -i -e 's#\@\@MADWIFI_PATH\@\@#${MADWIFI_PATH}#' \ - $CWD/${PRGNAM}_cvs-devel_defconfig.patch -#patch -p 0 < $CWD/${PRGNAM}_defconfig.patch -patch -p 0 < $CWD/${PRGNAM}_cvs-devel_defconfig.patch -cp defconfig .config +sed -ie \ + "s/^#define VERSION_STR \"\(.*\)\"/#define VERSION_STR \"\1_$VERSION\"/" \ + version.h +sed -e "s#\@\@MADWIFI_PATH\@\@#${MADWIFI_PATH}#" \ + $CWD/${PRGNAM}-${VERSION}.defconfig \ + > .config chown -R root.root . make 2>&1 | tee $CWD/make.log -# This goes in the doc directoryi later on: +# This goes in the doc directory later on: cp wpa_supplicant.conf wpa_supplicant.conf.sample mkdir -p $PKG/usr/sbin cp wpa_supplicant wpa_passphrase wpa_cli $PKG/usr/sbin/ mkdir -p $PKG/etc -cat <<-_EOT_ > $PKG/etc/wpa_supplicant.conf +cat <<-_EOT_ > $PKG/etc/wpa_supplicant.conf.new # See /usr/doc/${PRGNAM}-${VERSION}/wpa_supplicant.conf.sample # for many more options that you can use in this file. @@ -133,6 +137,7 @@ cat <<-_EOT_ > $PKG/etc/wpa_supplicant.conf # Plaintext connection (no WPA, no IEEE 802.1X), # nice for hotel/airport types of WiFi network. + # You'll need a recent version of wireless-tools for this! network={ ssid="any" key_mgmt=NONE @@ -152,6 +157,29 @@ strip --strip-unneeded 2> /dev/null ) +# --- 'doinst.sh' script: ------ + +mkdir -p $PKG/install +cat <<EOINS > $PKG/install/doinst.sh +# Handle the incoming configuration files: +config() { + for infile in \$1; do + NEW="\$infile" + OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... + done +} +config etc/wpa_supplicant.conf.new + +EOINS + # --- DOCUMENTATION --- # Copy the documentation: mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION} |