Sven-Hendrik Haase pushed to branch main at Arch Linux / Packaging / Packages / lz4
Commits: 78e81c72 by Sven-Hendrik Haase at 2023-12-25T14:00:09+01:00 upgpkg: 1:1.9.4-2: Switch to CMake build system (#1) - - - - - 2 changed files: - + .SRCINFO - PKGBUILD Changes: ===================================== .SRCINFO ===================================== @@ -0,0 +1,17 @@ +pkgbase = lz4 + pkgdesc = Extremely fast compression algorithm + pkgver = 1.9.4 + pkgrel = 2 + epoch = 1 + url = https://lz4.github.io/lz4/ + arch = x86_64 + license = GPL2 + checkdepends = diffutils + makedepends = git + makedepends = cmake + makedepends = ninja + depends = glibc + source = git+https://github.com/lz4/lz4.git#tag=v1.9.4 + sha256sums = SKIP + +pkgname = lz4 ===================================== PKGBUILD ===================================== @@ -3,49 +3,36 @@ pkgname=lz4 epoch=1 pkgver=1.9.4 -pkgrel=1 +pkgrel=2 pkgdesc='Extremely fast compression algorithm' arch=('x86_64') url='https://lz4.github.io/lz4/' license=('GPL2') -makedepends=('git') +makedepends=('git' 'cmake' 'ninja') checkdepends=('diffutils') depends=('glibc') source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver") sha256sums=('SKIP') -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() { - # do not use the main makefile, it calls sub make with -e - # exported CLFAGS by makepkg break the version. see FS#50071 - cd $pkgname - make -C lib PREFIX=/usr - make -C programs PREFIX=/usr lz4 lz4c + cmake -B build -S "$pkgname"/build/cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE='None' \ + -DCMAKE_INSTALL_PREFIX='/usr' \ + -Wno-dev + cmake --build build } check() { rm -f passwd.lz4 - $pkgname/programs/lz4 /etc/passwd passwd.lz4 - $pkgname/programs/lz4 -d passwd.lz4 passwd + build/lz4 /etc/passwd passwd.lz4 + build/lz4 -d passwd.lz4 passwd diff -q /etc/passwd passwd rm passwd } package() { - cd $pkgname - make install PREFIX=/usr DESTDIR="$pkgdir" + DESTDIR="$pkgdir" cmake --install build } # vim:set ts=2 sw=2 et: View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/lz4/-/commit/78e81c72475f3af3aca4c17976f883f1d6e53a25 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/lz4/-/commit/78e81c72475f3af3aca4c17976f883f1d6e53a25 You're receiving this email because of your account on gitlab.archlinux.org.