Skip to content

Commit

Permalink
Also zsyncmake
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored May 9, 2024
1 parent adff5b6 commit 167e151
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/build-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions ci/install-static-zsyncmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#! /bin/bash

set -euxo pipefail

if [[ "${1:-}" == "" ]]; then
echo "Usage: $0 <version>"
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

0 comments on commit 167e151

Please sign in to comment.