Files
swupd-client/scripts/github_actions/build_ci_dependencies.bash
William Douglas 42e38325fd Add CI fixes for github's updated Ubuntu container
Includes needed dev packages and an ignore for error messages seen on
Ubuntu's version of curl but not in Clear Linux.

Signed-off-by: William Douglas <william.douglas@intel.com>
2025-03-03 17:11:46 -08:00

49 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Build all custom dependencies needed by swupd:
# - Curl
# - Bsdiff
# - libarchive
#
# As process is slow, it can be cached. If directory dependencies exists,
# just install already build dependencies.
set -e
CORES=2
sudo apt install libbz2-dev liblzma-dev
# If alread exists, reuse
if [ -d dependencies ]; then
pushd dependencies
for i in *; do
if [ -d "$i" ]; then
pushd "$i"
sudo make install
popd
fi
done
popd
exit
fi
mkdir dependencies
pushd dependencies
# build bsdiff
wget https://github.com/clearlinux/bsdiff/releases/download/v1.0.2/bsdiff-1.0.2.tar.xz
tar -xvf bsdiff-1.0.2.tar.xz
pushd bsdiff-1.0.2 && ./configure --prefix=/usr --disable-tests && make -j"$CORES" && sudo make install && popd
## build curl
wget https://curl.haxx.se/download/curl-7.64.0.tar.gz
tar -xvf curl-7.64.0.tar.gz
pushd curl-7.64.0 && ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu && make -j"$CORES" && sudo make install && popd
# build libarchive
wget https://github.com/libarchive/libarchive/archive/v3.3.1.tar.gz
tar -xvf v3.3.1.tar.gz
pushd libarchive-3.3.1 && autoreconf -fi && ./configure --prefix=/usr && make -j"$CORES" && sudo make install && popd
popd