summaryrefslogtreecommitdiffstats
path: root/madwifi
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2007-10-13 11:08:24 +0000
committer Eric Hameleers <alien@slackware.com>2007-10-13 11:08:24 +0000
commitc9f068301686545c7d23927c0f8a50d52750b47f (patch)
treecebaf1a5f23bc4679db5cbd7699ae979c4dab0eb /madwifi
parentd6a4cfb4727919d0f0b25e36138abd0be7fc7ac9 (diff)
downloadasb-c9f068301686545c7d23927c0f8a50d52750b47f.tar.gz
asb-c9f068301686545c7d23927c0f8a50d52750b47f.tar.xz
Add support for 2.6.23 kernel
Diffstat (limited to 'madwifi')
-rwxr-xr-xmadwifi/build/madwifi.SlackBuild45
1 files changed, 16 insertions, 29 deletions
diff --git a/madwifi/build/madwifi.SlackBuild b/madwifi/build/madwifi.SlackBuild
index fa927aa8..e4e900a4 100755
--- a/madwifi/build/madwifi.SlackBuild
+++ b/madwifi/build/madwifi.SlackBuild
@@ -60,6 +60,8 @@
# * This release fixes a few security issues.
# 0.9.3.2-1: 15/aug/2007 by Eric Hameleers <alien@slackware.com>
# * This release adds support for the 2.6.22 kernel.
+# 0.9.3.2-2: 13/oct/2007 by Eric Hameleers <alien@slackware.com>
+# * Patch to support the 2.6.23 kernel.
# -----------------------------------------------------------------------------
# Change SNAPSHOT from "" to "yes" below if you're building a snapshot release.
@@ -69,7 +71,7 @@ PRGNAM=madwifi
SRCVER="0.9.3.2"
VERSION=${VERSION:-0.9.3.2} # Note: for snapshot builds,
# the VERSION value changes further down;
-BUILD=1
+BUILD=2
ARCH=${ARCH:-i486}
KVER=${KVER:-`uname -r`}
@@ -133,31 +135,15 @@ case "$ARCH" in
;;
esac
-if [ ! -d $TMP/tmp-$PRGNAM ]; then
- mkdir -p $TMP/tmp-$PRGNAM # location to build the source
-elif [ "$P1" != "--oldbuild" ]; then
- # If the "--oldbuild" parameter is present, we keep
- # the old build files and continue;
- # By default we remove the remnants of previous build and continue:
- rm -rf $TMP/tmp-$PRGNAM/*
-fi
-
-if [ "$PKG" = "" -o "$PKG" = "/" ] ; then
- echo "Please provide a sane value for the variable 'PKG'."
- exit 1
-elif [ ! -d $PKG ]; then
- mkdir -p $PKG # place for the package to be built
-else
- rm -rf $PKG/* # We always erase old package's contents:
-fi
-
-if [ ! -d $OUTPUT ]; then
- mkdir -p $OUTPUT # place for the package to be saved
-fi
-
-
-# --- SOURCE FILE AVAILABILITY ---
+# Prepare the build environment:
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # We always erase old package's contents:
+mkdir -p $OUTPUT # place for the package to be saved
+rm -f $OUTPUT/*${PRGNAM}*.log # clean out old logfiles
+# Source file availability:
if [ -z $SNAPSHOT ]; then # download stable release
if ! [ -f ${SOURCE} ]; then
if ! [ "x${SRCURL}" == "x" ]; then
@@ -166,7 +152,7 @@ if [ -z $SNAPSHOT ]; then # download stable release
echo "Source '`basename ${SOURCE}`' not available yet..."
echo "Will download file to `dirname $SOURCE`"
wget --connect-timeout=20 -O "${SOURCE}" "${SRCURL}" || true
- if [ $? -ne 0 ]; then
+ if [ $? -ne 0 ! -s "${SOURCE}" ]; then
echo "Downloading '`basename ${SOURCE}`' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
exit 1
@@ -193,7 +179,6 @@ echo "+=================+"
echo "| $PRGNAM-$VERSION |"
echo "+=================+"
-rm -f $OUTPUT/*.log
cd $TMP/tmp-$PRGNAM
# Actually to build a snapshot (not the stable release) you must get
@@ -203,12 +188,12 @@ cd $TMP/tmp-$PRGNAM
# To update to the current version of the source at a later time you just need
# to change to that subdirectory and type:
# $ svn update
-# Then pack the source tree into madwifi-ng-yyyymmdd.tar.gz for use in this build.
+# Then pack the source tree into madwifi-ng-yyyymmdd.tar.gz
#
# ... or get a snapshot at http://snapshots.madwifi.org/
echo "Extracting the source tarball..."
-tar xzvf "$SOURCE"
+tar -xzvf "$SOURCE"
# I expect a pristine kernel source (freshly installed slackware package)
# Madwifi expects the sources at the location that the link
@@ -221,6 +206,8 @@ cd -
if [ -z $SNAPSHOT ]; then
cd ${PRGNAM}-${SRCVER}
+ # Patch the source to support kernel > 2.6.22 :
+ patch -p0 < ${SRCDIR}/madwifi_kernel_2.6.23.diff
else
cd ${PRGNAM}-ng-${SRCVER}
fi