diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..60577a8 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Github repository +REPO="cracklib/cracklib" + +# 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 94f6a5f..5246a73 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,8 @@ name: cracklib description: Password checking library -version: 2.9.11 +version: 2.10.3 url: https://github.com/cracklib/cracklib license: GPL architecture: any +depends: ["glibc","zlib"] type: source diff --git a/source.sh b/source.sh index e071203..e6c4dd0 100644 --- a/source.sh +++ b/source.sh @@ -34,4 +34,7 @@ package() { mkdir -p "$BPM_OUTPUT"/usr/share/dict/ ln -sf /usr/share/cracklib/cracklib-small "$BPM_OUTPUT"/usr/share/dict/cracklib-small sh ./util/cracklib-format dicts/cracklib-small | sh ./util/cracklib-packer "$BPM_OUTPUT"/usr/share/cracklib/pw_dict + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING.LIB "$BPM_OUTPUT"/usr/share/licenses/cracklib/COPYING.LIB }