32 lines
919 B
Bash
32 lines
919 B
Bash
#!/bin/bash
|
|
|
|
. ./scripts/colors.sh
|
|
. ./scripts/funcs.sh
|
|
. ./scripts/config.sh
|
|
. ./scripts/libnl.sh
|
|
|
|
iw() {
|
|
[ ! -d $build/libnl ] && libnl
|
|
pkgname=iw
|
|
pkgver=6.9
|
|
srcurl=https://www.kernel.org/pub/software/network/${pkgname}/${pkgname}-${pkgver}.tar.xz
|
|
print_info "** Building and installing ${pkgname}"
|
|
mkdir -p $build/iw
|
|
cd $build/iw
|
|
if [ ! -f $root/downloads/${pkgname}-${pkgver}.tar.xz ]; then
|
|
print_info "** Downloading $srcurl"
|
|
cd $root/downloads
|
|
wget $srcurl
|
|
check $? "download $srcurl"
|
|
cd -
|
|
fi
|
|
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.xz
|
|
cd ${pkgname}-${pkgver}
|
|
CC=${CROSS_COMPILE}-gcc \
|
|
PKG_CONFIG_PATH=/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/pkgconfig \
|
|
make ${makeflags}
|
|
check $? "Build ${pkgname}"
|
|
cp -v iw $rootfspath/usr/bin/iw
|
|
check $? "Install to rootfs ${pkgname}"
|
|
}
|