diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..aa27b94 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Git repository +REPO="https://aomedia.googlesource.com/aom.git" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep -v '-' | tail -1) + +# 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 e1b80ac..93892dd 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,6 @@ name: libaom description: Alliance for Open Media video codec -version: 3.10.0 -revision: 2 +version: 3.13.1 url: https://aomedia.org/ license: BSD-3-Clause architecture: any diff --git a/source.sh b/source.sh index c4fc145..833ca72 100644 --- a/source.sh +++ b/source.sh @@ -15,30 +15,21 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir aom-build - cd aom-build - - cmake -DCMAKE_INSTALL_PREFIX=/usr \ + cmake -B build-aom \ + -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=1 \ -DENABLE_DOCS=no \ - -DENABLE_NASM=yes \ - -G Ninja .. - ninja -} - -# The check function is executed in the source directory -# This function is used to run tests to verify the package has been compiled correctly -check() { - cd aom-build - ninja runtests + -DENABLE_NASM=yes + cmake --build build-aom } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - cd aom-build - DESTDIR="$BPM_OUTPUT" ninja install + DESTDIR="$BPM_OUTPUT" cmake --install build-aom + + # Remove static library rm -v "$BPM_OUTPUT"/usr/lib/libaom.a install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libaom/LICENSE