diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..6ebdc45 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="libunwind/libunwind" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 91fa1f7..91ac859 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,8 @@ name: libunwind description: C API for determining the call-chain of a program -version: 1.8.1 +version: 1.8.3 url: https://www.nongnu.org/libunwind/ license: MIT architecture: any +depends: ["glibc","xz-utils","zlib"] type: source diff --git a/source.sh b/source.sh index 158fa05..f6bee9a 100644 --- a/source.sh +++ b/source.sh @@ -10,12 +10,19 @@ FILENAME="${DOWNLOAD##*/}" prepare() { wget "$DOWNLOAD" tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + + cd "$BPM_SOURCE" + # Fix GCC 15 error + sed -i '/func.s/s/s//' tests/Gtest-nomalloc.c + autoreconf -fi } # The build function is executed in the source directory # This function is used to compile the source code build() { ./configure --prefix=/usr --disable-static + # prevent excessive overlinking due to libtool + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } @@ -30,5 +37,6 @@ check() { package() { make DESTDIR="$BPM_OUTPUT" install + # Install package license install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/libunwind/COPYING }