Switch to new download format and build with meson
This commit is contained in:
2 files changed
+21
-15
No files matched your search
@@ -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:
|
||||
- [email protected]
|
||||
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
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user