From 059831534c7e884f0a607ed86b582fd00d821731 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Sat, 26 Sep 2026 23:24:03 +0200 Subject: New upstream version 3.2.0~rc1+dfsg --- .github/scripts/build-hamlib-linux.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 .github/scripts/build-hamlib-linux.sh (limited to '.github/scripts/build-hamlib-linux.sh') diff --git a/.github/scripts/build-hamlib-linux.sh b/.github/scripts/build-hamlib-linux.sh new file mode 100755 index 00000000..11676c56 --- /dev/null +++ b/.github/scripts/build-hamlib-linux.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [ "$#" -ne 2 ]; then + echo "Usage: build-hamlib-linux.sh REF PREFIX" >&2 + exit 2 +fi + +ref="$1" +prefix="$2" + +git init hamlib-src +git -C hamlib-src remote add origin https://github.com/Hamlib/Hamlib.git +git -C hamlib-src fetch --depth 1 origin "$ref" +git -C hamlib-src checkout --detach FETCH_HEAD +actual_commit="$(git -C hamlib-src rev-parse HEAD)" +if [[ "$ref" =~ ^[0-9a-f]{40}$ ]] && [ "$actual_commit" != "$ref" ]; then + echo "Hamlib source mismatch: expected $ref, got $actual_commit" >&2 + exit 1 +fi +cd hamlib-src +./bootstrap +./configure \ + --prefix="$prefix" \ + --disable-shared --enable-static \ + --without-cxx-binding \ + --without-readline \ + --without-indi \ + CFLAGS="-g -O2 -fPIC -fdata-sections -ffunction-sections" \ + LDFLAGS="-Wl,--gc-sections" +make -j"$(nproc)" +make install -- cgit v1.2.3