#!/bin/bash . ./scripts/colors.sh . ./scripts/funcs.sh . ./scripts/config.sh libnl() { pkgname=libnl pkgver=3.10.0 _upkgver=3_10_0 srcurl=https://github.com/thom311/libnl/releases/download/${pkgname}${_upkgver}/${pkgname}-${pkgver}.tar.gz print_info "** Building and installing ${pkgname}" [ ! -d $build/${pkgname} ] && mkdir $build/${pkgname} cd $build/${pkgname} tar -xf $root/downloads/${pkgname}-${pkgver}.tar.gz check $? "Extract ${pkgname}" cd ${pkgname}-${pkgver} ./configure \ --host=${CROSS_COMPILE} \ --disable-debug \ --disable-static \ --disable-cli \ --build=x86_64-pc-linux-gnu \ --prefix=/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr check $? "Configure ${pkgname}" make $makeflags check $? "Build ${pkgname}" make DESTDIR=$(pwd)/bin install cd $(pwd)/bin/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib tar -czvf /tmp/${pkgname}.tar.gz . check $? "Archived libs" cd - cd $rootfspath/usr/lib tar -xf /tmp/${pkgname}.tar.gz check $? "Unrchived libs" cd - }