2018-11-03 17:23:57 +01:00
|
|
|
VERSION="4.19.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/"
|
2018-11-03 17:23:57 +01:00
|
|
|
SHA256SUM="d9ec5ca1f47d8a85416fa26e7dc1cbf5d067640eb60e90bdc1c7e5bdc6a29984"
|
2018-08-19 15:59:43 +02:00
|
|
|
DEPENDS="libmnl"
|
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
|
2018-06-16 17:46:17 +02:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$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
|
|
|
}
|