diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..f9f6160 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Git repository +REPO="https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | tail -1 | cut -d'/' -f3) + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$VERSION" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index c46198d..9f8a1e1 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,10 @@ name: libdrm description: Userspace interface to kernel DRM services -version: 2.4.124 +version: 2.4.125 url: https://dri.freedesktop.org/ license: MIT architecture: any depends: ["glibc","libpciaccess"] -make_depends: ["meson"] +optional_depends: ["cairo"] +make_depends: ["meson","cairo"] type: source diff --git a/source.sh b/source.sh index 3d3d34d..68bf1f5 100644 --- a/source.sh +++ b/source.sh @@ -15,31 +15,24 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir build - cd build - - meson setup --prefix=/usr \ - --libdir=/usr/lib \ - --buildtype=release \ - -Dudev=true \ - -Dvalgrind=disabled \ - .. - ninja + meson setup --prefix=/usr \ + --libdir=/usr/lib \ + --buildtype=release \ + -Dudev=true \ + -Dvalgrind=disabled \ + -Dinstall-test-programs=true \ + build + meson compile -C build } # 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 build - ninja test + meson test -C build --print-errorlogs } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - cd build - DESTDIR="$BPM_OUTPUT" ninja install - - sed -n 3,25p < ../libsync.h > ../LICENSE - install -Dm644 ../LICENSE "$BPM_OUTPUT"/usr/share/licenses/libdrm/LICENSE + meson install -C build --destdir="$BPM_OUTPUT" }