curl - Commandline tool for transferring files with URL syntax ChangeLog


# cURL 8.3.0
# ==========
# Slackware 14.0: curl 7.27.0
# Slackware 14.1: curl 7.31.0
# Slackware 14.2: curl 7.49.1
# Slackware 15.0: curl 7.81.0

# Success building with OpenSSL 1.1.1 and 3.0

# Previous versions of this howto have used the /usr/local prefix, the
# default when you build it from source.  If you want to uninstall one of
# those, or just clean up files from an old version, skip down to the bottom
# for removal instructions.

# Prerequisites:
# pkg-config
# OpenSSL or BoringSSL or LibreSSL (optional)
# zlib (optional)
# OpenLDAP (optional; for ldap:// support)
# Perl
# groff
# bison
# Kerberos (optional; for GSS-API)
# libssh2 (optional; for ssh support)
# nghttp2 (optional; for http2 support)
# librtmp (optional)
# libmetalink (optional)
# libpsl (optional)
# GNU SASL (optional)
# Brotli (optional)
# c-ares (optional; --enable-ares)
# ngtcp2 (optional; --with-ngtcp2)
# quiche (optional; --with-quiche)

# Get it
test -f installed/curl-8.3.0.tar.xz && mv installed/curl-8.3.0.tar.xz .
test ! -f curl-8.3.0.tar.xz &&

# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "376d627767d6c4f05105ab6d497b0d9aba7111770dd9d995225478209c37ea63  curl-8.3.0.tar.xz" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys B71E12C2 > /dev/null 2>&1 || gpg --recv-keys B71E12C2 ) &&
wget -nc &&
  gpg --verify curl-8.3.0.tar.xz.asc && rm curl-8.3.0.tar.xz.asc

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "curl-*" -exec rm -r {} \;
tar xJvf ~/curl-8.3.0.tar.xz
cd curl-8.3.0
test $UID = 0 && chown -R root:root .

# If your OpenSSL is not installed under /usr/local/ssl, pass
# --with-ssl to configure by itself with no path.  If configure
# can't find it, use LDFLAGS=-L/usr/local/ssl/lib64 or wherever libssl
# and libcrypto are.

# If you do use Slackware and your /usr/share/man is a symlink
# to /usr/man, then don't worry about the mandir part (if you're
# feeling exceptionally lazy).

# You may need LIBS="-lssl -lcrypto" to get LDAP support added successfully

# Configure the build, 64-bit with OpenSSL prefix /usr/local
# (default in >= 1.1.0)
test $(uname -m) = "x86_64" &&
test -d /usr/local/include/openssl &&
  LIBS="-lssl -lcrypto" ./configure --prefix=/usr --libdir=/usr/lib64    --mandir=/usr/man --with-ssl --with-libssh2 --enable-ldap --enable-ldaps    --enable-ares

# Configure the build, 64-bit with OpenSSL prefix /usr/local/ssl
test $(uname -m) = "x86_64" &&
test -d /usr/local/ssl/include &&
  LDFLAGS=-L/usr/local/ssl/lib64 ./configure --prefix=/usr    --mandir=/usr/man --libdir=/usr/lib64 --with-ssl=/usr/local/ssl    --with-libssh2 --enable-ldap --enable-ldaps --enable-ares

# Configure the build, anything else
test $(uname -m) != "x86_64" &&
./configure --prefix=/usr --mandir=/usr/man --with-ssl   --with-libssh2 --enable-ldap --enable-ldaps --enable-ares

# Build it

# Test the build
make test

# Become root to install it

# Remove the Slackware package, if there is one
# Read the next few parts too before you do it
test -x /sbin/removepkg && /sbin/removepkg curl

# Be aware that in (at least) Slackware >= 12.2,* files
# are in the aaa_elflibs|aaa_libraries package.  Not sure why, maybe
# because of gnupg and gnupg2's gpgkeys_curl/gpg2keys_curl, or maybe just
# for whatever needs them.  If you are really low on space, like on an
# embedded system, you may be able to remove the old ones (anything without
# today's date in /usr/lib or /usr/lib64).  Otherwise it will not hurt any
# to leave it there, and if anything is specifically linked with an older
# version of*, then you'll be avoiding trouble by leaving it
# there.
# If you are upgrading from an older version previously installed from
# source, there may be old shared library files in there for that reason
# too.

# Install it
make install

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again

# Save the source for later
mkdir -p -m 0700 installed
rm -f installed/curl-*.tar.*
mv curl-8.3.0.tar.xz installed/

# If you ever want to uninstall cURL, this should do it:
test -d src/curl-* && ( cd src/curl-* ; make uninstall )
for pfx in /usr /usr/local;
  ( cd ${pfx}/bin ; rm -f curl curl-config )
  test -d ${pfx}/include/curl && rm -r ${pfx}/include/curl
  ( cd ${pfx}/share/man/man1 ; rm -f curl.1 curl-config.1 )
  test -d ${pfx}/share/curl && rm -r ${pfx}/share/curl
  rm -f ${pfx}/lib/libcurl.* ${pfx}/lib/pkgconfig/libcurl.pc    ${pfx}/share/man/man3/curl_*.3
find ~/src -maxdepth 1 -type d -name "curl-*" -exec rm -r {} \;
rm -f ~/installed/curl-*.tar.*

List of HOWTOs

Last updated: 2023-09-09 10:40pm EDT(-0400)
Copyright © 2001-2023 Jason Englander. All Rights reserved.