diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..f77f274 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Gitlab repository +REPO="xdg/shared-mime-info" + +# 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.freedesktop.org/api/v4/projects/"$REPO"/repository/tags | jq -r '.[0].name') + +echo "$TAG_NAME" diff --git a/pkg.info b/pkg.info index aa196d1..4a59658 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: shared-mime-info description: Freedesktop.org Shared MIME Info version: 2.4 -revision: 2 +revision: 3 url: https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/ license: GPL2 architecture: any diff --git a/source.sh b/source.sh index d662ffe..2ea29b1 100644 --- a/source.sh +++ b/source.sh @@ -15,18 +15,15 @@ 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 --buildtype=release -Dupdate-mimedb=true .. - ninja + meson setup --prefix=/usr --buildtype=release -Dupdate-mimedb=true build + meson compile -C build } # 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 package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/shared-mime-info/COPYING }