bootstrap-iproute2.sh (621B)
- #!/bin/sh
- set -ex
- die() {
- echo "die: $@"
- exit 1
- }
- command -v make || die "Run /bootstrap-make.sh"
- command -v pkg-config || die "Run /bootstrap-pkgconf.sh"
- tar xof /iproute2-*.tar.gz
- cd ./iproute2-*/
- ./configure --prefix /usr
- # tc(1) requires flex (or at least a lex with -o)
- # -maxdepth 1 is unsupported by both sbase and heirloom find(1)
- printf '%s\n' \
- '/SUBDIRS=/s;tc ;;' \
- '/iproute2 -maxdepth 1/s;install;\# install;' \
- w q | ed Makefile
- # Requires static_assert which is guarded behind C11
- export CFLAGS="${CFLAGS} -std=c11"
- unset MAKE
- make clean
- make HOSTCC=$CC
- make install
- cd ..
- rm -r ./iproute2-*/