| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# usage: build_libcurl.sh |
| 4 |
|
| 5 |
set -x |
| 6 |
archive=curl-8.12.1 |
| 7 |
|
| 8 |
# if it already exists, don't bother |
| 9 |
test -r /usr/lib/libcurl.* && exit 0 |
| 10 |
test -r /usr/lib/x86_64-linux-gnu/libcurl.* && exit 0 |
| 11 |
|
| 12 |
# fetch |
| 13 |
curl https://curl.se/download/${archive}.tar.bz2 -o ${archive}.tar.bz2 || exit $? |
| 14 |
|
| 15 |
# unpack, configure, build, install, cleanup |
| 16 |
tar -xjf ${archive}.tar.bz2 |
| 17 |
rm ${archive}.tar.bz2 |
| 18 |
cd ${archive} |
| 19 |
|
| 20 |
# ./configure --help; exit 1 |
| 21 |
|
| 22 |
# the previous fetch library, nanoHTTP, did not support https, |
| 23 |
# so in order to not create accidental incompatibilities, we also |
| 24 |
# do not support https here. But we still need the curl program |
| 25 |
# to work; we just have the curl built here renamed. |
| 26 |
|
| 27 |
CFLAGS=-Os ./configure --prefix=/usr/ --program-prefix=nossl- \ |
| 28 |
--enable-http --enable-ftp \ |
| 29 |
--disable-https \ |
| 30 |
--without-ssl \ |
| 31 |
--disable-file \ |
| 32 |
--disable-ipfs \ |
| 33 |
--disable-ldap \ |
| 34 |
--disable-dpaps \ |
| 35 |
--disable-rtsp \ |
| 36 |
--disable-dict \ |
| 37 |
--disable-telnet \ |
| 38 |
--disable-tftp \ |
| 39 |
--disable-pop3 \ |
| 40 |
--disable-imap \ |
| 41 |
--disable-smb \ |
| 42 |
--disable-smtp \ |
| 43 |
--disable-gopher \ |
| 44 |
--disable-qmtt \ |
| 45 |
--disable-manual \ |
| 46 |
--disable-docs \ |
| 47 |
--without-libpsl \ |
| 48 |
--disable-curl \ |
| 49 |
|| exit $? |
| 50 |
|
| 51 |
# --with-openssl \ |
| 52 |
|
| 53 |
make -j 5 || exit $? |
| 54 |
make install || exit $? |
| 55 |
cd .. && rm -rf ${archive} |
| 56 |
|