mirror of
https://github.com/pygos/build.git
synced 2024-11-14 23:47:11 +01:00
David Oberhollenzer
1a697b336f
Use a seperate sysroot directory (stored in variable SYSROOT) instead of installing everything into the toolchain directory. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
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="$SYSROOT/include" \
|
|
DBM_INCLUDE="$SYSROOT/include"
|
|
}
|
|
|
|
deploy() {
|
|
make DESTDIR="$PKGDEPLOYDIR" PREFIX="" SBINDIR="/bin" \
|
|
KERNEL_INCLUDE="$SYSROOT/include" \
|
|
DBM_INCLUDE="$SYSROOT/include" install
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
}
|
|
|
|
check_update() {
|
|
check_update_simple "$URL" "iproute2" "tar.xz"
|
|
}
|