1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-25 12:20:42 +01:00
build/pkg/iproute2/build
David Oberhollenzer b439824565 Bump iproute2 version
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-08-10 21:31:32 +02:00

40 lines
1 KiB
Text
Executable file

VERSION="5.2.0"
SRCDIR="iproute2-${VERSION}"
TARBALL="${SRCDIR}.tar.xz"
URL="https://www.kernel.org/pub/linux/utils/net/iproute2/"
SHA256SUM="a5b95dec26353fc71dba9bb403e9343fad2a06bd69fb154a22a2aa2914f74da8"
DEPENDS="toolchain libmnl-dev"
SUBPKG="iproute2 iproute2-dev"
prepare() {
return
}
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
make CCOPTS="-O2 $cflags" LDFLAGS="$ldflags" \
HOSTCC="gcc" AR="${TARGET}-ar" LD="${TARGET}-ld" \
CC="${TARGET}-gcc" PREFIX="" SBINDIR="/bin" \
KERNEL_INCLUDE="$TCDIR/$TARGET/include" \
DBM_INCLUDE="$TCDIR/$TARGET/include"
}
deploy() {
make DESTDIR="$PKGDEPLOYDIR" PREFIX="" SBINDIR="/bin" \
KERNEL_INCLUDE="$TCDIR/$TARGET/include" \
DBM_INCLUDE="$TCDIR/$TARGET/include" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
}
check_update() {
check_update_simple "$URL" "iproute2" "tar.xz"
}