2018-07-20 17:40:33 +02:00
|
|
|
VERSION="2.6"
|
|
|
|
SRCDIR="hostapd-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
|
|
URL="https://w1.fi/releases/"
|
|
|
|
SHA256SUM="01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d"
|
|
|
|
DEPENDS="libnl3 openssl"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cp -r ${1}/* ${PKGBUILDDIR}
|
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/config" "$PKGBUILDDIR/hostapd/.config"
|
|
|
|
|
2018-10-20 19:27:23 +02:00
|
|
|
local cflags="-O2 -Os"
|
2018-10-19 13:02:06 +02:00
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
2018-10-20 19:27:23 +02:00
|
|
|
cflags="$cflags -fstack-protector-all"
|
|
|
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
2018-10-19 13:02:06 +02:00
|
|
|
fi
|
2018-10-14 18:47:20 +02:00
|
|
|
|
|
|
|
PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \
|
|
|
|
CFLAGS="-MMD -O2 $cflags" \
|
|
|
|
LDFLAGS="$ldflags" \
|
2018-07-20 17:40:33 +02:00
|
|
|
make CC=${TARGET}-gcc -C hostapd -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
|
|
|
local DEPLOY="$2"
|
|
|
|
|
|
|
|
mkdir -p "$DEPLOY/etc"
|
|
|
|
cat_file_override "hostapd.conf" > "$DEPLOY/etc/hostapd.conf"
|
|
|
|
|
|
|
|
make -C hostapd BINDIR=/bin DESTDIR="$DEPLOY" install
|
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
|
|
|
}
|
|
|
|
|
|
|
|
check_update() {
|
|
|
|
curl --silent -L "$URL" | grep -o ">hostapd-[0-9.]*tar.gz<" | \
|
|
|
|
sed 's/>hostapd-//g' | sed 's/.tar.gz<//g' | \
|
|
|
|
verson_find_greatest "$VERSION"
|
|
|
|
}
|