mirror of
https://github.com/pygos/build.git
synced 2024-11-05 11:37:10 +01:00
David Oberhollenzer
d2432c1d1e
- rewrite the rootfs_files.txt listings to the format used by pkg - create package files from each package - use "pkg install" to manage installation of packages and dependencies into the rootfs and initrd staging dirs Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
40 lines
968 B
Text
Executable file
40 lines
968 B
Text
Executable file
VERSION="4.20.0"
|
|
SRCDIR="iproute2-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="https://www.kernel.org/pub/linux/utils/net/iproute2/"
|
|
SHA256SUM="c8adaa6a40f888476b23acb283cfa30c0dd55f07b5aa20663ed5ba2ef1f6fda8"
|
|
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/*.{files,desc} "$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"
|
|
}
|