1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-09 07:16:13 +02:00
build/pkg/hostapd/build
David Oberhollenzer c8d01f966a Use pkgtool to resolve and manage dependencies, add sub package support
Been working on this for too long, don't remember the specifics, will add
documentation.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 17:47:02 +01:00

46 lines
1.1 KiB
Plaintext
Executable file

VERSION="2.7"
SRCDIR="hostapd-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://w1.fi/releases/"
SHA256SUM="21b0dda3cc3abe75849437f6b9746da461f88f0ea49dd621216936f87440a141"
DEPENDS="libnl3-dev openssl-dev crt-dev"
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
PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" \
CFLAGS="-MMD -O2 $cflags" \
LDFLAGS="$ldflags" \
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/*.{files,desc} "$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"
}