diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..d1496d1 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="mesonbuild/meson" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index e53589a..ffb38e7 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,9 @@ name: meson description: The Meson build system -version: 1.3.2 -revision: 2 +version: 1.8.0 url: https://mesonbuild.com/ license: Apache2 architecture: any depends: ["ninja","python3"] -make_depends: ["python-setuptools","python-wheel"] +make_depends: ["python-build","python-installer","python-setuptools","python-wheel"] type: source diff --git a/source.sh b/source.sh index 6eb0a9e..3048477 100644 --- a/source.sh +++ b/source.sh @@ -15,13 +15,18 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD + python3 -m build --wheel --no-isolation . } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - pip3 install --root="$BPM_OUTPUT" --ignore-installed --no-index --find-links dist meson - install -vDm644 data/shell-completions/bash/meson "$BPM_OUTPUT"/usr/share/bash-completion/completions/meson - install -vDm644 data/shell-completions/zsh/_meson "$BPM_OUTPUT"/usr/share/zsh/site-functions/_meson + python3 -m installer --destdir "$BPM_OUTPUT" --prefix=/usr dist/*.whl + + # Install shell completions + install -Dm644 data/shell-completions/bash/meson "$BPM_OUTPUT"/usr/share/bash-completion/completions/meson + install -Dm644 data/shell-completions/zsh/_meson "$BPM_OUTPUT"/usr/share/zsh/site-functions/_meson + + # Install package license + install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/meson/COPYING }