Switch to new download format and build with meson

This commit is contained in:
EnumDev committed 2026-10-11 19:44:37 +03:00
1 parent 2c712c1915
commit b038881f1e
2 files changed
+21 -15

No files matched your search

+8 -2
View File
@@ -1,9 +1,9 @@
name: lz4 name: lz4
description: Extremely fast compression algorithm description: Extremely fast compression algorithm
version: 1.10.0 version: 1.10.0
revision: 2 revision: 3
url: https://lz4.github.io/lz4/ url: https://lz4.github.io/lz4/
license: GPL2 license: GPL-2.0-or-later
maintainers: maintainers:
- [email protected] - [email protected]
architecture: any architecture: any
@@ -12,3 +12,9 @@ depends:
- glibc - glibc
make_depends: make_depends:
- diffutils - 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
+13 -13
View File
@@ -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 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 # 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 # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { 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 # The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly # This function is used to run tests to verify the package has been compiled correctly
check() { 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 # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package() {
make BUILD_STATIC=no PREFIX=/usr DESTDIR="$BPM_OUTPUT" install meson install -C lz4-build --destdir="$BPM_OUTPUT"
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lz4/LICENSE install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lz4/LICENSE