diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..1e63763 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Gitlab repository +REPO="xiph/ogg" + +# Replace slash with URL encoded representation +REPO=$(echo "$REPO" | sed 's|/|%2F|g') + +# Get tag name using Gitlab Rest API +TAG_NAME=$(curl -s -L https://gitlab.xiph.org/api/v4/projects/"$REPO"/releases/permalink/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 47a839b..f7dd778 100644 --- a/pkg.info +++ b/pkg.info @@ -1,6 +1,6 @@ name: libogg description: Ogg bitstream and framing library -version: 1.3.5 +version: 1.3.6 url: https://www.xiph.org/ogg/ license: BSD architecture: any diff --git a/source.sh b/source.sh index 83c56ee..41646d8 100644 --- a/source.sh +++ b/source.sh @@ -2,7 +2,7 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://downloads.xiph.org/releases/ogg/libogg-${BPM_PKG_VERSION}.tar.xz" +DOWNLOAD="https://gitlab.xiph.org/xiph/ogg/-/archive/v${BPM_PKG_VERSION}/ogg-v${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory @@ -10,6 +10,9 @@ FILENAME="${DOWNLOAD##*/}" prepare() { wget "$DOWNLOAD" tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + + cd "$BPM_SOURCE" + ./autogen.sh } # The build function is executed in the source directory @@ -30,5 +33,6 @@ check() { package() { make DESTDIR="$BPM_OUTPUT" install + # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libogg/COPYING }