1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00
build/pkg/iproute2/build
David Oberhollenzer 6c0ec9a4ab Bump iproute2 version
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-03 19:28:43 +01:00

40 lines
972 B
Text
Executable file

VERSION="4.19.0"
SRCDIR="iproute2-${VERSION}"
TARBALL="${SRCDIR}.tar.xz"
URL="https://www.kernel.org/pub/linux/utils/net/iproute2/"
SHA256SUM="d9ec5ca1f47d8a85416fa26e7dc1cbf5d067640eb60e90bdc1c7e5bdc6a29984"
DEPENDS="libmnl"
prepare() {
apply_patches
}
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" SYSROOT="$TCDIR/$TARGET"
}
deploy() {
local SOURCE="$1"
local DEPLOY="$2"
make DESTDIR="$DEPLOY" SYSROOT="$TCDIR/$TARGET" install
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
}
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"
}