summaryrefslogtreecommitdiffstats
path: root/network/hostapd/hostapd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/hostapd/hostapd.SlackBuild')
-rw-r--r--network/hostapd/hostapd.SlackBuild29
1 files changed, 18 insertions, 11 deletions
diff --git a/network/hostapd/hostapd.SlackBuild b/network/hostapd/hostapd.SlackBuild
index 8dd14ed682..ace2dcf921 100644
--- a/network/hostapd/hostapd.SlackBuild
+++ b/network/hostapd/hostapd.SlackBuild
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for hostapd
# Copyright 2008-2013 Murat D. Kadirov <banderols@gmail.com>
# Copyright 2014-2016 LukenShiro, Italy
-# Copyright 2018, 2019 Brenton Earl <brent@exitstatusone.com>
+# Copyright 2018-2020 Brenton Earl <brent@exitstatusone.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,10 +26,13 @@
# Fixed doinst.sh by Mario Preksavec <mario@slackware.hr>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=hostapd
-VERSION=${VERSION:-2.7}
+VERSION=${VERSION:-2.10}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,7 +42,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -53,6 +60,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -75,14 +85,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-(cd ../src/
-for i in $CWD/patches/*.patch; do
- patch -p2 < "$i"
-done)
-
+# Edit the defconfig to enable additional features
cat $CWD/hostapd.defconfig > .config
-CFLAGS+="$SLKCFLAGS" make
+export CFLAGS+="$SLKCFLAGS"
+make
mkdir -p \
$PKG/usr/sbin/ \
@@ -118,4 +125,4 @@ cat $CWD/doinst.sh $DOINST_TMP > $PKG/install/doinst.sh
rm -f $DOINST_TMP
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE