diff options
Diffstat (limited to 'network/madwifi-driver/madwifi-driver.SlackBuild')
-rw-r--r-- | network/madwifi-driver/madwifi-driver.SlackBuild | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/network/madwifi-driver/madwifi-driver.SlackBuild b/network/madwifi-driver/madwifi-driver.SlackBuild index d5521e532f..3e41964c96 100644 --- a/network/madwifi-driver/madwifi-driver.SlackBuild +++ b/network/madwifi-driver/madwifi-driver.SlackBuild @@ -4,44 +4,56 @@ ## Written by hollywoodb (hollywoodb@fastmail.fm) ## Maintained by Robby Workman <rworkman@slackbuilds.org> +## Modified by Larry Hajali <larryhaja[at]gmail[dot]com> KERNELVERSION=${KERNELVERSION:-$(uname -r)} KERNELPATH=${KERNELPATH:-/lib/modules/${KERNELVERSION}/build} -NAME=madwifi +PRGNAM=madwifi VERSION=0.9.4 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + PKG_NAME=madwifi-driver -PKG_VERS=$(echo ${VERSION}_$KERNELVERSION | tr '-' '_') +PKG_VERSION=$(echo ${VERSION}_$KERNELVERSION | tr '-' '_') -ARCH=${ARCH:-i486} CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG=${PKG:-$TMP/package-$NAME} +PKG=${PKG:-$TMP/package-$PKG_NAME} OUTPUT=${OUTPUT:-/tmp} -BUILD=${BUILD:-2} -TAG=${TAG:-_SBo} + +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 -rm -rf $NAME-$VERSION -tar xvf $CWD/$NAME-$VERSION.tar.gz || exit 1 -cd $NAME-$VERSION || exit 1 +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . -KERNELPATH=$KERNELPATH KERNELRELEASE=$KERNELVERSION make modules || exit 1 -KERNELPATH=$KERNELPATH KERNELRELEASE=$KERNELVERSION make install-modules DESTDIR=$PKG || exit 1 +# Patches to build madwifi against Slacware 12.2 kernel +# Patch from: http://madwifi-project.org/changeset/3696 +patch -p1 < $CWD/patches/madwifi-0.9.4_kernel_2.6.26.diff +# Patch from: http://slackware.com/~alien/slackbuilds/madwifi/build/ +patch -p1 < $CWD/patches/madwifi-0.9.4_kernel_2.6.27.diff + +KERNELPATH=$KERNELPATH KERNELRELEASE=$KERNELVERSION \ + make modules +KERNELPATH=$KERNELPATH KERNELRELEASE=$KERNELVERSION \ + make install-modules DESTDIR=$PKG -mkdir -p $PKG/usr/doc/$PKG_NAME-$PKG_VERS -cp -a COPYRIGHT $PKG/usr/doc/$PKG_NAME-$PKG_VERS -cp -a hal/COPYRIGHT $PKG/usr/doc/$PKG_NAME-$PKG_VERS/COPYRIGHT.hal -cp -a hal/README $PKG/usr/doc/$PKG_NAME-$PKG_VERS/README.hal -cat $CWD/$PKG_NAME.SlackBuild > $PKG/usr/doc/$PKG_NAME-$PKG_VERS/$PKG_NAME.SlackBuild +mkdir -p $PKG/usr/doc/$PKG_NAME-$PKG_VERSION +cp -a COPYRIGHT $PKG/usr/doc/$PKG_NAME-$PKG_VERSION +cp -a hal/COPYRIGHT $PKG/usr/doc/$PKG_NAME-$PKG_VERSION/COPYRIGHT.hal +cp -a hal/README $PKG/usr/doc/$PKG_NAME-$PKG_VERSION/README.hal +cat $CWD/$PKG_NAME.SlackBuild > $PKG/usr/doc/$PKG_NAME-$PKG_VERSION/$PKG_NAME.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh +sed s/_KERNEL_/$KERNELVERSION/ $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PKG_NAME-$PKG_VERS-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD$TAG.tgz |