From e7b3f75abf725131e450af6462818c13309c94b1 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 17 Sep 2025 22:08:09 +0300 Subject: [PATCH] Update package version to 0.2.13 --- check-version.sh | 12 ++++++++++++ pkg.info | 4 ++-- source.sh | 5 ++++- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..e5c59a3 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="caolanm/libwmf" + +# 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"/releases/latest | jq -r '.tag_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 04cfd45..90c2481 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: libwmf description: Library for reading and converting WMF (Windows Meta Files) -version: 0.2.8.4 -url: https://wvware.sourceforge.net/libwmf.html +version: 0.2.13 +url: https://github.com/caolanm/libwmf license: LGPL2.1-or-later architecture: any depends: ["expat","freetype2","glibc","libjpeg-turbo","libpng","libx11","zlib"] diff --git a/source.sh b/source.sh index fbfb4f0..551e564 100644 --- a/source.sh +++ b/source.sh @@ -2,7 +2,7 @@ # 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 -DOWNLOAD="https://sourceforge.net/projects/wvware/files/libwmf/${BPM_PKG_VERSION}/libwmf-${BPM_PKG_VERSION}.tar.gz/download" +DOWNLOAD="https://github.com/caolanm/libwmf/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory @@ -16,6 +16,8 @@ prepare() { # This function is used to compile the source code build() { ./configure --prefix=/usr --with-gsfontmap=/usr/share/ghostscript/Resource/Init/Fontmap.GS --with-gsfontdir=/usr/share/fonts/gsfonts + # prevent excessive overlinking due to libtool + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } @@ -24,5 +26,6 @@ build() { package() { make DESTDIR="$BPM_OUTPUT" install + # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libwmf/COPYING }