mirror of
https://github.com/pygos/build.git
synced 2024-11-14 15:37: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>
34 lines
816 B
Text
Executable file
34 lines
816 B
Text
Executable file
VERSION="5.3"
|
|
SRCDIR="iw-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="https://mirrors.edge.kernel.org/pub/software/network/iw"
|
|
SHA256SUM="04afe857bc8dea67e461946de30ae1b012954b6965839c5c3fda7d0ed15505d5"
|
|
DEPENDS="libnl3-dev toolchain"
|
|
|
|
build() {
|
|
cp -r ${1}/* ${PKGBUILDDIR}
|
|
|
|
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="-O2 $cflags" \
|
|
LDFLAGS="$ldflags" \
|
|
make CC="${TARGET}-gcc" PREFIX= \
|
|
SBINDIR=/bin DESTDIR="$PKGDEPLOYDIR" -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
make CC="${TARGET}-gcc" PREFIX= \
|
|
SBINDIR=/bin DESTDIR="$PKGDEPLOYDIR" install
|
|
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
}
|
|
|
|
check_update() {
|
|
check_update_simple "$URL" "iw" "tar.xz"
|
|
}
|