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-02-27 14:22:03 +01:00
|
|
|
DEPENDS="libmnl-dev crt-dev"
|
|
|
|
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() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-01-15 16:03:14 +01:00
|
|
|
|
|
|
|
make DESTDIR="$DEPLOY" SYSROOT="$TCDIR/$TARGET" install
|
2019-02-03 17:13:28 +01:00
|
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
|
2018-01-15 16:03:14 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
curl --silent -L $URL | grep -o "iproute2-[0-9.]*tar.xz" | \
|
|
|
|
sed 's/iproute2-//g' | sed 's/.tar.xz//g' | \
|
|
|
|
verson_find_greatest "$VERSION"
|
2018-10-14 18:47:20 +02:00
|
|
|
}
|