From b038881f1eb9a2194cc4cda78fa39a46fc7c96a1 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 11 Oct 2026 19:44:37 +0300 Subject: [PATCH] Switch to new download format and build with meson --- info.yml | 10 ++++++++-- recipe.sh | 26 +++++++++++++------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/info.yml b/info.yml index 893dc31..a55a7d8 100644 --- a/info.yml +++ b/info.yml @@ -1,9 +1,9 @@ name: lz4 description: Extremely fast compression algorithm version: 1.10.0 -revision: 2 +revision: 3 url: https://lz4.github.io/lz4/ -license: GPL2 +license: GPL-2.0-or-later maintainers: - enumdev@enumerated.dev architecture: any @@ -12,3 +12,9 @@ depends: - glibc make_depends: - diffutils + - meson +downloads: + - url: https://github.com/lz4/lz4/releases/download/v${BPM_PKG_VERSION}/lz4-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b diff --git a/recipe.sh b/recipe.sh index 1a3f61f..4d2d41a 100644 --- a/recipe.sh +++ b/recipe.sh @@ -2,32 +2,32 @@ # 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://github.com/lz4/lz4/releases/download/v${BPM_PKG_VERSION}/lz4-${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() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - make BUILD_STATIC=no + meson setup build/meson lz4-build \ + --prefix=/usr \ + --buildtype=plain \ + -Dcontrib=true \ + -Dexamples=true \ + -Dprograms=true + meson compile -C lz4-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() { - make -j1 check + rm -f passwd.lz4 + lz4-build/meson/programs/lz4 /etc/passwd passwd.lz4 + lz4-build/meson/programs/lz4 -d passwd.lz4 passwd + diff -q /etc/passwd passwd + rm passwd } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - make BUILD_STATIC=no PREFIX=/usr DESTDIR="$BPM_OUTPUT" install + meson install -C lz4-build --destdir="$BPM_OUTPUT" # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lz4/LICENSE