Files
2025-04-03 17:39:16 +07:00

25 lines
780 B
Bash

#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
zlib() {
pkgname=zlib
pkgver=1.3.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.gz
check $? "Extract ${pkgname}"
cd ${pkgname}-${pkgver}
CC=${CROSS_COMPILE}-gcc ./configure --prefix=/usr --shared
check $? "Configure ${pkgname}"
make $makeflags
check $? "Build ${pkgname}"
make DESTDIR=$rootfspath install
# rm -rv $rootfspath/usr/include $rootfspath/usr/share/man $rootfspath/usr/lib/{pkgconfig,libz.a}
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/libz.so.${pkgver}
check $? "Installing to rootfs ${pkgname}"
}