summaryrefslogtreecommitdiffstats
path: root/madwifi
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-09-08 13:59:01 +0000
committer Eric Hameleers <alien@slackware.com>2008-09-08 13:59:01 +0000
commit8068c4531f3bd191326fbfbe08f8e91b95da9c7d (patch)
treeb8c40ee5cb7f51933df1d61b9963df09401d9f77 /madwifi
parent2e7d97928dbcbda6347484ec293124588f4a0453 (diff)
downloadasb-8068c4531f3bd191326fbfbe08f8e91b95da9c7d.tar.gz
asb-8068c4531f3bd191326fbfbe08f8e91b95da9c7d.tar.xz
Updated for newer snapshot, also remove old 2.4 kernel cruft. No longer try to 'make clean' the kernel source tree
Diffstat (limited to 'madwifi')
-rwxr-xr-xmadwifi/build/madwifi.SlackBuild51
1 files changed, 24 insertions, 27 deletions
diff --git a/madwifi/build/madwifi.SlackBuild b/madwifi/build/madwifi.SlackBuild
index a7659e92..d8bf1753 100755
--- a/madwifi/build/madwifi.SlackBuild
+++ b/madwifi/build/madwifi.SlackBuild
@@ -70,7 +70,8 @@
# * Upgrade.
# 20080521: 21/may/2008 by Eric Hameleers <alien@slackware.com>
# * Fixed the SlackBuild so that it builds SVN snapshots again,
-# just set SNAPSHOT to "yes"
+# 20080908: 08/sep/2008 by Eric Hameleers <alien@slackware.com>
+# * Update.
# -----------------------------------------------------------------------------
# Change SNAPSHOT from "" to "yes" below if you're building a snapshot release.
@@ -80,14 +81,13 @@ SNAPSHOT=${SNAPSHOT:-"yes"}
PRGNAM=madwifi
SRCVER="0.9.4"
VERSION=${VERSION:-0.9.4} # Note: for snapshot builds,
- # the VERSION value changes further down;
+ # the VERSION value changes further down;
BUILD=1
TAG=${TAG:-"alien"}
ARCH=${ARCH:-i486}
-KVER=${KVER:-`uname -r`}
+KVER=${KVER:-$(uname -r)}
KSRC=${KSRC:-/lib/modules/${KVER}/build}
-PATCHLEVEL=`echo $KVER|cut -f 2 -d '.'`
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -117,7 +117,7 @@ set -u
P1=${1:-1}
# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then
+if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then
MOPT=tune
else
MOPT=cpu
@@ -153,17 +153,17 @@ rm -f $OUTPUT/*${PRGNAM}*.log # clean out old logfiles
if ! [ -f ${SOURCE} ]; then
if ! [ "x${SRCURL}" == "x" ]; then
# Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/`basename $SOURCE`"
- echo "Source '`basename ${SOURCE}`' not available yet..."
- echo "Will download file to `dirname $SOURCE`"
+ [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
+ echo "Source '$(basename ${SOURCE})' not available yet..."
+ echo "Will download file to $(dirname $SOURCE)"
wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
- echo "Downloading '`basename ${SOURCE}`' failed... aborting the build."
+ echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
exit 1
fi
else
- echo "File '`basename ${SOURCE}`' not available... aborting the build."
+ echo "File '$(basename ${SOURCE})' not available... aborting the build."
exit 1
fi
fi
@@ -176,8 +176,8 @@ fi
# For snapshots we can only determine the VERSION using the tarball:
if [ ! -z $SNAPSHOT ]; then
echo -n "Changing VERSION from '$VERSION' to "
- SRCVER=`tar tf $SOURCE |head -1|cut -d- -f3-|cut -d/ -f1`
- VERSION=`echo $SRCVER|tr '-' '_'`
+ SRCVER=$(tar tf $SOURCE |head -1|cut -d- -f3-|cut -d/ -f1)
+ VERSION=$(echo $SRCVER|tr '-' '_')
echo "'$VERSION'"
fi
@@ -189,14 +189,12 @@ cd $TMP/tmp-$PRGNAM
echo "Extracting the source tarball..."
tar -xzvf "$SOURCE"
-# I expect a pristine kernel source (freshly installed slackware package)
-# Madwifi expects the sources at the location that the link
-# "/lib/modules/<kernelversion>/build" points to.... so be it.
-cd ${KSRC}
-[ $PATCHLEVEL -eq 4 ] && \
- make clean oldconfig dep || \
- make clean oldconfig prepare
-cd -
+## I expect a pristine kernel source (freshly installed slackware package)
+## Madwifi expects the sources at the location that the link
+## "/lib/modules/<kernelversion>/build" points to.... so be it.
+#cd ${KSRC}
+#make clean oldconfig prepare
+#cd -
if [ -z $SNAPSHOT ]; then
cd ${PRGNAM}-${SRCVER}
@@ -225,7 +223,7 @@ make clean all KERNELPATH=${KSRC} KERNELRELEASE=${KVER} \
mkdir -p $PKG/usr/{bin,man}
# Use installwatch if available:
-if `which installwatch > /dev/null 2>&1`; then
+if $(which installwatch > /dev/null 2>&1); then
installwatch -o $OUTPUT/install-${PRGNAM}.log make install DESTDIR=$PKG \
BINDIR=/usr/bin MANDIR=/usr/man KERNELPATH=${KSRC} KERNELRELEASE=${KVER}
else
@@ -253,22 +251,21 @@ cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 644 {} \;
# Compress the man pages:
-[ -d $PKG/usr/man ] && find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
-# Compress the kernel modules:
-[ $PATCHLEVEL -eq 4 ] && find $PKG/lib/modules -name "*.?" -type f -exec gzip -9 {} \;
-
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Write a doinst.sh file:
-[ $PATCHLEVEL -eq 4 ] && MODCONFFILE=modules.conf || MODCONFFILE=modprobe.conf
cat <<-EEOOTT > $PKG/install/doinst.sh
# Only run depmod on matching running kernel
# Slackware will run depmod anyway on reboot):
MYMODVER=$KVER
- MYKERNEL=\`uname -r\`
+ MYKERNEL=\$(uname -r)
if [ "\$MYKERNEL" = "\$MYMODVER" ]; then
if [ -x sbin/depmod ]; then