From 2308cdf1c6a4d8b17c07c475a9222bf9896520b5 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 10 May 2025 11:35:25 +0300 Subject: [PATCH] Add license --- check-version.sh | 12 ++++++++++++ pkg.info | 2 +- source.sh | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..31b932e --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="rhboot/efivar" + +# 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 5305e9b..2304906 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: efivar description: Tools and libraries to work with EFI variables version: 39 -revision: 2 +revision: 3 url: https://github.com/rhboot/efivar license: LGPL2.1-or-later architecture: any diff --git a/source.sh b/source.sh index c777c39..b04b17c 100644 --- a/source.sh +++ b/source.sh @@ -22,4 +22,7 @@ build() { # This function is used to move the compiled files into the output directory package() { make DESTDIR="$BPM_OUTPUT" LIBDIR=/usr/lib install + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/efivar/COPYING }