mirror of
https://github.com/pygos/build.git
synced 2024-11-25 12:20:42 +01:00
40 lines
1 KiB
Text
Executable file
40 lines
1 KiB
Text
Executable file
VERSION="5.2.0"
|
|
SRCDIR="iproute2-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="https://www.kernel.org/pub/linux/utils/net/iproute2/"
|
|
SHA256SUM="a5b95dec26353fc71dba9bb403e9343fad2a06bd69fb154a22a2aa2914f74da8"
|
|
DEPENDS="toolchain libmnl-dev"
|
|
SUBPKG="iproute2 iproute2-dev"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
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" PREFIX="" SBINDIR="/bin" \
|
|
KERNEL_INCLUDE="$TCDIR/$TARGET/include" \
|
|
DBM_INCLUDE="$TCDIR/$TARGET/include"
|
|
}
|
|
|
|
deploy() {
|
|
make DESTDIR="$PKGDEPLOYDIR" PREFIX="" SBINDIR="/bin" \
|
|
KERNEL_INCLUDE="$TCDIR/$TARGET/include" \
|
|
DBM_INCLUDE="$TCDIR/$TARGET/include" install
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
}
|
|
|
|
check_update() {
|
|
check_update_simple "$URL" "iproute2" "tar.xz"
|
|
}
|