Files
SimpleLinux/scripts/libnl.sh
T
2025-03-01 04:11:08 +07:00

39 lines
1.3 KiB
Bash

#!/bin/sh
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
pkgname=libnl
pkgver=3.10.0
libnl() {
printf "$GREEN** Building and installing libnl\n$RESET"
[ ! -d $build/libnl ] && mkdir $build/libnl
cd $build/libnl
tar -xvf $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/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr
check $? "Configure $pkgname"
make $makeflags
check $? "Build $pkgname"
make DESTDIR=$(pwd)/bin install
rm -rv $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/{pkgconfig,*.la}
${CROSS_COMPILE}-strip $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/*
cd $(pwd)/bin/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib
tar -czvf /tmp/libnl.tar.gz .
check $? "Archived libs"
cd -
cd $rootfspath/usr/lib
tar -xvf /tmp/libnl.tar.gz
check $? "Unrchived libs"
cd -
}