mirror of
https://github.com/pygos/build.git
synced 2024-11-14 23:47:11 +01:00
David Oberhollenzer
fa4eff263b
This commit adds an "emptypackage" template that implements defaults for all package functions and is included before every package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
35 lines
908 B
Text
Executable file
35 lines
908 B
Text
Executable file
VERSION="2.9"
|
|
SRCDIR="hostapd-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
URL="https://w1.fi/releases"
|
|
SHA256SUM="881d7d6a90b2428479288d64233151448f8990ab4958e0ecaca7eeb3c9db2bd7"
|
|
DEPENDS="libnl3-dev openssl-dev toolchain"
|
|
|
|
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"
|
|
}
|