1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-23 03:29:46 +01:00
build/pkg/hostapd/build
David Oberhollenzer 41721f809f Bump hostapd version
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-07-07 16:36:13 +02:00

39 lines
932 B
Text
Executable file

VERSION="2.8"
SRCDIR="hostapd-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://w1.fi/releases/"
SHA256SUM="929f522be6eeec38c53147e7bc084df028f65f148a3f7e4fa6c4c3f955cee4b0"
DEPENDS="libnl3-dev openssl-dev toolchain"
prepare() {
return
}
build() {
cp -r ${1}/* ${PKGBUILDDIR}
cp "$SCRIPTDIR/pkg/$PKGNAME/config" "$PKGBUILDDIR/hostapd/.config"
local cflags="-O2 -Os"
local ldflags=""
if [ "x$TC_HARDENING" = "xyes" ]; then
cflags="$cflags -fstack-protector-all"
ldflags="$ldflags -z noexecstack -z relro -z now"
fi
CFLAGS="-MMD -O2 $cflags" \
LDFLAGS="$ldflags" \
make CC=${TARGET}-gcc -C hostapd -j $NUMJOBS
}
deploy() {
mkdir -p "$PKGDEPLOYDIR/etc"
cat_file_override "hostapd.conf" > "$PKGDEPLOYDIR/etc/hostapd.conf"
make -C hostapd BINDIR=/bin DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
}
check_update() {
check_update_simple "$URL" "hostapd" "tar.gz"
}