diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..86d0a6f --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Github repository +REPO="dosfstools/dosfstools" + +# 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) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$VERSION" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index c9f31cd..04d6314 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,9 @@ name: dosfstools description: Utilities to manage FAT family filesystems version: 4.2 +revision: 2 url: https://github.com/dosfstools/dosfstools/ license: GPL3 architecture: any +depends: ["glibc"] type: source diff --git a/source.sh b/source.sh index 9fbe86d..76cc2d8 100644 --- a/source.sh +++ b/source.sh @@ -32,4 +32,7 @@ check() { # This function is used to move the compiled files into the output directory package() { make DESTDIR="$BPM_OUTPUT" install + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/dosfstools/COPYING }