2019-01-09 15:40:30 +01:00
|
|
|
VERSION="4.20.0"
|
2018-01-15 16:03:14 +01:00
|
|
|
SRCDIR="iproute2-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
|
|
URL="https://www.kernel.org/pub/linux/utils/net/iproute2/"
|
2019-01-09 15:40:30 +01:00
|
|
|
SHA256SUM="c8adaa6a40f888476b23acb283cfa30c0dd55f07b5aa20663ed5ba2ef1f6fda8"
|
2019-03-30 23:28:30 +01:00
|
|
|
DEPENDS="toolchain libmnl-dev"
|
2019-02-27 14:22:03 +01:00
|
|
|
SUBPKG="iproute2 iproute2-dev"
|
2018-01-15 16:03:14 +01:00
|
|
|
|
|
|
|
prepare() {
|
2018-02-09 18:49:17 +01:00
|
|
|
apply_patches
|
2018-01-15 16:03:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-02-16 23:22:04 +01:00
|
|
|
cp -r ${1}/* ${PKGBUILDDIR}
|
2018-01-15 16:03:14 +01:00
|
|
|
|
2018-10-20 19:27:23 +02:00
|
|
|
local cflags="-O2 -Os"
|
2018-10-19 13:02:06 +02:00
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
2018-10-20 19:27:23 +02:00
|
|
|
cflags="$cflags -fstack-protector-all"
|
|
|
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
2018-10-19 13:02:06 +02:00
|
|
|
fi
|
2018-10-14 18:47:20 +02:00
|
|
|
|
|
|
|
make CCOPTS="-O2 $cflags" LDFLAGS="$ldflags" \
|
|
|
|
HOSTCC="gcc" AR="${TARGET}-ar" LD="${TARGET}-ld" \
|
|
|
|
CC="${TARGET}-gcc" SYSROOT="$TCDIR/$TARGET"
|
2018-01-15 16:03:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
2019-03-06 10:03:12 +01:00
|
|
|
make DESTDIR="$PKGDEPLOYDIR" SYSROOT="$TCDIR/$TARGET" install
|
|
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
2018-01-15 16:03:14 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
2019-03-30 10:40:54 +01:00
|
|
|
check_update_simple "$URL" "iproute2-" "tar.xz"
|
2018-10-14 18:47:20 +02:00
|
|
|
}
|