diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..d4eb2d3 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Gitlab repository +REPO="GNOME/gobject-introspection" + +# 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.gnome.org/api/v4/projects/"$REPO"/releases/permalink/latest | jq -r '.tag_name') + +echo "$TAG_NAME" diff --git a/pkg.info b/pkg.info index 03ef9ec..2375fc8 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,9 @@ name: gobject-introspection description: Introspection system for GObject-based libraries -version: 1.84.0 +version: 1.86.0 url: https://wiki.gnome.org/Projects/GObjectIntrospection license: GPL2-or-later,LGPL2-or-later architecture: any depends: ["glib","glibc","libffi","python3","python-mako","python-markdown","python-setuptools"] -make_depends: ["cairo","gtk-doc","meson"] +make_depends: ["cairo","meson"] type: source diff --git a/source.sh b/source.sh index 578c6ca..548c9b9 100644 --- a/source.sh +++ b/source.sh @@ -15,18 +15,20 @@ 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 -Dtests=false build + meson compile -C build +} - meson setup --prefix=/usr --libdir=/usr/lib --buildtype=release -Dtests=false .. - 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() { + 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 + meson install -C build --destdir="$BPM_OUTPUT" install -Dm644 "$BPM_SOURCE"/COPYING.GPL "$BPM_OUTPUT"/usr/share/licenses/gobject-introspection/COPYING.GPL install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gobject-introspection/COPYING