diff --git a/a/nct6687d/SlackBuild b/a/nct6687d/SlackBuild index 32276abf..766116e1 100755 --- a/a/nct6687d/SlackBuild +++ b/a/nct6687d/SlackBuild @@ -12,7 +12,7 @@ PKG=$TMP/pkg-$PRGNAM REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM GITHUB_REPO=Fred78290/nct6687d -VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | jq -r .tag_name | sed 's|^null$|trunk|')} # or VERSION=trunk +VERSION=${VERSION:-"latest"} KERNEL_VERSION=$(uname -r) ARCH=$(uname -m) @@ -34,8 +34,18 @@ rm -fr $PKG $TMP/$PRGNAM cp -R $REPOSITORY $TMP/$PRGNAM cd $TMP/$PRGNAM - -[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION +case $VERSION in + trunk) + VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" + ;; + latest) + VERSION=$(git for-each-ref --sort=taggerdate --format '%(tag)' | tail -n1) + git checkout $VERSION + ;; + *) + git checkout $VERSION + ;; +esac # compilation make diff --git a/wayland/sway/SlackBuild b/wayland/sway/SlackBuild index d4bab342..78a7c089 100755 --- a/wayland/sway/SlackBuild +++ b/wayland/sway/SlackBuild @@ -2,7 +2,7 @@ # variables GITHUB_REPO=swaywm/sway -VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | jq -r .tag_name | sed 's|^null$|trunk|')} # or VERSION=trunk +VERSION=${VERSION:-"latest"} BUILD=2 TAG=gwh @@ -29,9 +29,20 @@ cd $REPOSITORY git pull --all cp -R $REPOSITORY $TMP/ -cd $TMP/$PRGNAM/ -[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION +cd $TMP/$PRGNAM/ +case $VERSION in + trunk) + VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" + ;; + latest) + VERSION=$(git for-each-ref --sort=taggerdate --format '%(tag)' | tail -n1) + git checkout $VERSION + ;; + *) + git checkout $VERSION + ;; +esac for p in $CWD/patches/*.patch; do git am $p @@ -120,4 +131,4 @@ EOF # empaquetage rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD$TAG.txz diff --git a/wayland/wlroots/SlackBuild b/wayland/wlroots/SlackBuild index f20eb2c9..e22b12c1 100755 --- a/wayland/wlroots/SlackBuild +++ b/wayland/wlroots/SlackBuild @@ -1,10 +1,11 @@ -#!/bin/bash -e +#!/bin/bash + +set -e # variables -VERSION=${VERSION:-"trunk"} +VERSION=${VERSION:-"latest"} BUILD=1 - TAG=gwh OUTPUT=/tmp TMP=/tmp/$TAG @@ -31,7 +32,18 @@ git pull --all cp -R $REPOSITORY $TMP/ cd $TMP/$PRGNAM/ -[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION +case $VERSION in + trunk) + VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" + ;; + latest) + VERSION=$(git for-each-ref --sort=taggerdate --format '%(tag)' | tail -n1) + git checkout $VERSION + ;; + *) + git checkout $VERSION + ;; +esac meson setup \ --prefix /usr \