diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..05d5cc5 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Github repository +REPO="neagix/idesk" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/tags | jq -r '.[0].name') + + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 186042d..359cf91 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,8 @@ name: idesk description: Program that shows users icons on their desktop -version: 0.7.8 -revision: 2 +version: 0.7.9 url: https://sourceforge.net/projects/idesk/ license: GPL architecture: any -depends: ["gcc-libs", "imlib2", "libpng", "libxft", "libxpm"] -make_depends: ["git", "pkgconf"] +depends: ["gcc-libs", "imlib2", "libpng", "librsvg", "libxft", "libxpm"] type: source diff --git a/source.sh b/source.sh index 22d7b43..d491042 100644 --- a/source.sh +++ b/source.sh @@ -2,23 +2,23 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -REPO="https://github.com/neagix/idesk" +DOWNLOAD="https://github.com/neagix/idesk/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory # This function is used for downloading files and putting them into the correct location prepare() { - git clone "$REPO" --branch v"$BPM_PKG_VERSION" "$BPM_SOURCE" - + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + cd "$BPM_SOURCE" - git apply ../imlib2-config.patch + autoreconf -fi } # The build function is executed in the source directory # This function is used to compile the source code build() { - autoreconf --install - ./configure --prefix=/usr + ./configure --prefix=/usr --enable-svg make } @@ -27,5 +27,6 @@ build() { package() { make DESTDIR="$BPM_OUTPUT" install + # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/idesk/COPYING }