Files
SimpleLinux/scripts/curl.sh
T
2026-02-26 13:40:18 +07:00

42 lines
1.1 KiB
Bash

#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
. ./scripts/zlib.sh
curl() {
if [ ! -d $build/zlib ]; then
zlib
fi
pkgname=curl
pkgver=8.9.1
printf "$GREEN** Building and installing curl\n$RESET"
mkdir $build/${pkgname}
cd $build/${pkgname}
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz
check $? "Extract ${pkgname}"
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--host=$CROSS_COMPILE \
--without-ssl \
--disable-static \
--enable-shared \
--with-zlib=$rootfspath
check $? "Configure ${pkgname}"
make $makeflags
check $? "Build ${pkgname}"
make DESTDIR=$rootfspath install
# rm \
# -rv \
# $rootfspath/usr/include \
# $rootfspath/usr/share/aclocal \
# $rootfspath/usr/share/man \
# $rootfspath/usr/lib/*.a \
# $rootfspath/usr/lib/*.la \
# $rootfspath/usr/lib/pkgconfig
# $CROSS_COMPILE-strip --strip-unneeded $rootfspath/usr/bin/curl $rootfspath/usr/lib/libcurl.so.4.8.0
check $? "Installing to rootfs ${pkgname}"
}