summaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2005-04-09 14:48:15 +0000
committer Eric Hameleers <alien@slackware.com>2005-04-09 14:48:15 +0000
commitb297e0964ec3fc035a178791508c804391102cf2 (patch)
tree8c86495a4e4284b8c9718edb3151d3bc523528eb /wpa_supplicant/build
downloadasb-b297e0964ec3fc035a178791508c804391102cf2.tar.gz
asb-b297e0964ec3fc035a178791508c804391102cf2.tar.xz
Initial revision
Diffstat (limited to 'wpa_supplicant/build')
-rwxr-xr-xwpa_supplicant/build/wpa_supplicant.SlackBuild125
1 files changed, 125 insertions, 0 deletions
diff --git a/wpa_supplicant/build/wpa_supplicant.SlackBuild b/wpa_supplicant/build/wpa_supplicant.SlackBuild
new file mode 100755
index 00000000..a87c8387
--- /dev/null
+++ b/wpa_supplicant/build/wpa_supplicant.SlackBuild
@@ -0,0 +1,125 @@
+#!/bin/sh
+#
+# ------------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers
+# Created: 23/sep/2004
+# For: wpa_supplicant
+# URL: http://hostap.epitest.fi/wpa_supplicant/
+# Requires: Source code for supported wireless card drivers
+# openssl >= 0.9.7
+# Changelog:
+# Build 1: 23/sep/2004 by Eric Hameleers
+# First release.
+#
+# ------------------------------------------------------------------------------
+#
+# Run 'sh SlackBuild --cleanup' to build a Slackware package.
+# The package (.tgz) plus descriptive .txt file and a .md5 file with
+# the md5sum are created in /tmp .
+# Install the package using 'installpkg <packagename>'.
+#
+# ------------------------------------------------------------------------------
+
+
+# --- INIT ---
+# Set initial variables:
+CWD=`pwd`
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+
+TARBALL=hostap
+PRGNAM=wpa_supplicant
+VERSION=20040923CVS
+ARCH=${ARCH:-i486}
+BUILD=1
+
+DOC="ChangeLog README ../www/wpa_supplicant/*.html doc/* $CWD/wpa_supplicant_config $CWD/README.slackware"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2"
+fi
+
+PKG=$TMP/package-$PRGNAM
+rm -rf $PKG
+
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+mkdir -p $PKG # place for the package to be assembled
+
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+# Explode the package framework:
+if [ -e $CWD/_$PRGNAM.tar.gz ]; then
+ (cd $PKG &&
+ explodepkg $CWD/_$PRGNAM.tar.gz )
+fi
+
+cd $TMP/tmp-$PRGNAM
+
+#
+# Extract the source archive, patch and modify
+#
+tar -xzvf $CWD/${TARBALL}-${VERSION}.tar.gz
+cd ${TARBALL}/${PRGNAM}
+patch -p 0 < $CWD/${PRGNAM}_Makefile.patch
+
+chown -R root.root .
+
+make 2>&1 | tee $CWD/make.log
+
+mkdir -p $PKG/usr/sbin
+cp wpa_supplicant wpa_pasphrase wpa_cli $PKG/usr/sbin/
+
+# Strip binaries and libs, fix ownership:
+chown -R root.root $PKG
+chgrp bin $PKG/usr/sbin/*
+chmod -R o-w $PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs
+strip --strip-unneeded 2> /dev/null
+)
+
+
+# --- DOCUMENTATION ---
+# Copy the documentation:
+mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION}
+cp -a $DOC $PKG/usr/doc/${PRGNAM}-${VERSION}
+chmod -R -w $PKG/usr/doc/${PRGNAM}-${VERSION}/*
+
+
+# --- PACKAGE DESCRIPTION ---
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+
+# --- PACKAGE CREATION ---
+# Build the package and compute its md5 checksum:
+cd $PKG
+makepkg --linkadd y --chown n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz
+cat $CWD/slack-desc | grep "^${PRGNAM}" > $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txt
+(cd $TMP && md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5)
+
+
+# --- CLEANUP ---
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/tmp-$PRGNAM
+ rm -rf $PKG
+fi
+