#!/bin/bash . ./scripts/colors.sh . ./scripts/funcs.sh . ./scripts/config.sh zlib() { pkgname=zlib pkgver=1.3.1 srcurl=https://www.zlib.net/zlib-1.3.1.tar.gz print_info "** Building and installing ${pkgname}" [ -d $build/${pkgname} ] && return 0 mkdir $build/${pkgname} cd $build/${pkgname} tar -xf $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 check $? "Installing to rootfs ${pkgname}" }