From 167e151d742dda9fc351b1576b0bfabd92ae8d90 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 09:16:39 +0000 Subject: [PATCH] Also zsyncmake --- ci/build-in-docker.sh | 1 + ci/build.sh | 1 + ci/install-static-zsyncmake.sh | 38 ++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 ci/install-static-zsyncmake.sh diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index 60e5a42..f008a71 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -79,6 +79,7 @@ git config --global --add safe.directory '*' bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 +bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 4.5.1 bash -euxo pipefail /source/ci/build.sh diff --git a/ci/build.sh b/ci/build.sh index 2ef27b2..3d62401 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -38,6 +38,7 @@ find AppDir cp "$(which desktop-file-validate)" AppDir/usr/bin cp "$(which mksquashfs)" AppDir/usr/bin +cp "$(which zsyncmake)" AppDir/usr/bin cp "$repo_root"/resources/AppRun.sh AppDir/AppRun chmod +x AppDir/AppRun diff --git a/ci/install-static-zsyncmake.sh b/ci/install-static-zsyncmake.sh new file mode 100644 index 0000000..d4f7449 --- /dev/null +++ b/ci/install-static-zsyncmake.sh @@ -0,0 +1,38 @@ +#! /bin/bash + +set -euxo pipefail + +if [[ "${1:-}" == "" ]]; then + echo "Usage: $0 " + exit 2 +fi + +version="$1" + +build_dir="$(mktemp -d -t zsyncmake-build-XXXXXX)" + +cleanup () { + if [ -d "$build_dir" ]; then + rm -rf "$build_dir" + fi +} +trap cleanup EXIT + +pushd "$build_dir" + +wget http://zsync.moria.org.uk/download/zsync-"$version".tar.bz2 -q +tar xf zsync-*.tar.bz2 + +cd zsync-*/ + +find . -type f -exec sed -i -e 's|off_t|size_t|g' {} \; + +./configure CFLAGS=-no-pie LDFLAGS=-static --prefix=/usr --build=$(arch)-unknown-linux-gnu + +if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then + jobs="$(nproc)" +else + jobs="$(nproc --ignore=1)" +fi + +make -j"$jobs" install \ No newline at end of file