diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..0ea9ded --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Gitlab repository +REPO="libtiff/libtiff" + +# Replace slash with URL encoded representation +REPO=$(echo "$REPO" | sed 's|/|%2F|g') + +# Get tag name using Gitlab Rest API +TAG_NAME=$(curl -s -L https://gitlab.com/api/v4/projects/"$REPO"/releases/permalink/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 255194c..a330410 100644 --- a/pkg.info +++ b/pkg.info @@ -1,11 +1,10 @@ name: libtiff description: Library for reading and writing TIFF image files -version: 4.6.0 -revision: 2 +version: 4.7.0 url: http://www.simplesystems.org/libtiff/ license: custom architecture: any depends: ["gcc-libs", "glibc", "libjpeg-turbo", "xz-utils", "zlib", "zstd"] optional_depends: ["freeglut"] -make_depends: ["freeglut", "cmake", "mesa", "ninja"] +make_depends: ["freeglut", "cmake", "mesa"] type: source diff --git a/source.sh b/source.sh index 79b3b47..f9bd329 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://download.osgeo.org/libtiff/tiff-${BPM_PKG_VERSION}.tar.gz" +DOWNLOAD="https://gitlab.com/libtiff/libtiff/-/archive/v${BPM_PKG_VERSION}/libtiff-v${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory @@ -15,25 +15,21 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir libtiff-build - cd libtiff-build - - cmake -DCMAKE_INSTALL_PREFIX=/usr -G Ninja .. - ninja + cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + cmake --build build } # The check function is executed in the source directory # This function is used to run tests to verify the package has been compiled correctly check() { - cd libtiff-build - ninja test + ctest --test-dir build } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - cd libtiff-build - DESTDIR="$BPM_OUTPUT" ninja install + DESTDIR="$BPM_OUTPUT" cmake --install build + # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE.md "$BPM_OUTPUT"/usr/share/licenses/libtiff/LICENSE.md }