jobcore/lz4/PKGBUILD
2024-07-29 01:07:10 +03:00

74 lines
2.1 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=lz4
epoch=1
pkgver=1.10.0
pkgrel=02
pkgdesc='Extremely fast compression algorithm'
#url='http://www.lz4.org/'
url='https://lz4.github.io/lz4/'
makedepends=('git' 'meson' 'ninja')
checkdepends=('diffutils')
depends=('glibc')
provides=('liblz4.so')
source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver")
#prepare() {
# cd $pkgname
# # apply patch from the source array (should be a pacman feature)
# local src
# for src in "${source[@]}"; do
# src="${src%%::*}"
# src="${src##*/}"
# [[ $src = *.patch ]] || continue
# msg2 "Applying patch $src..."
# patch -Np1 < "../$src"
# done
#}
build() {
# cmake -B build -S "$pkgname"/build/cmake \
# -G Ninja \
# -DCMAKE_BUILD_TYPE='None' \
# -DCMAKE_INSTALL_PREFIX='/usr' \
# -Wno-dev
# cmake --build build
meson setup --prefix=/usr --buildtype=plain lz4/build/meson build
meson configure build -Dcontrib=true -Dexamples=true -Dprograms=true
meson compile -C build
}
check() {
rm -f passwd.lz4
# build/lz4 /etc/passwd passwd.lz4
# build/lz4 -d passwd.lz4 passwd
build/meson/programs/lz4 /etc/passwd passwd.lz4
build/meson/programs/lz4 -d passwd.lz4 passwd
diff -q /etc/passwd passwd
rm passwd
}
package() {
# DESTDIR="$pkgdir" cmake --install build
meson install -C build --destdir "$pkgdir"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL-2.0-or-later')
sha256sums=(487f9bc24fdaf589e2f4bb23dd98b1f21a71b643db09251145616587c9468555) # lz4 1.10.0
# Note to packager:
#ls -l *pkg.tar.lz
#echo "you must rename this package to meet SF naming before you move to the repo"
#mv $(ls -l $pkgname*pkg.tar.lz) $pkgname-$epoch_$pkgver-$pkgrel-$arch.pkg.tar.lz >pkg-mv.log
## c950d3c2c43f80b767261446b9692acd900371a49855a58c13c69994b403e1ff lz4-1_1.10.0-02-x86_64.pkg.tar.lz