/* * brotli — Brotli compression (curl/wget HTTP compression). * * cmake-only build (no Makefile in the release): uses the store cmake, * static libs only. */ package "brotli" { const version = "1.2.0" const source = "https://github.com/google/brotli/archive/refs/tags/v${version}.tar.gz" sha256 = "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec" license = "MIT" provides = ["libbrotli.a"] depends = [ { name = "cmake" }, { name = "make" }, ] prepare { curl -L -o brotli-${version}.tar.gz ${source} echo "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec brotli-${version}.tar.gz" | sha256sum -c - tar xf brotli-${version}.tar.gz --strip-components=1 ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/cmake/destdir/usr/bin ]; then echo $ROOT/temp/cmake/destdir/usr/bin; else echo $ROOT/bin/$(grep '^cmake ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > cmake.path } build { PATH=$(cat cmake.path):$PATH cmake -B build -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF PATH=$(cat cmake.path):$PATH cmake --build build -j${jobs} } install { PATH=$(cat cmake.path):$PATH DESTDIR=${destdir} cmake --install build find ${destdir} -name '*.la' -delete find ${destdir} -name '*.la' -delete } }