2018-08-17 10:46:08 +02:00
|
|
|
VERSION="4.18.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-08-17 10:46:08 +02:00
|
|
|
SHA256SUM="a9e6c70c95f513871c5e1f4e452c04fcb3c4d8a05be651bd794cd994a52daa45"
|
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-19 13:02:06 +02:00
|
|
|
local cflags=""
|
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
|
|
|
cflags="-fstack-protector-all"
|
|
|
|
ldflags="-z noexecstack -z relro -z now"
|
|
|
|
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
|
|
|
}
|