Files
2026-08-18 18:59:25 -04:00

46 lines
1.4 KiB
Plaintext

/*
* zlib — general-purpose compression library.
*
* The foundation of the dependency tree: nearly everything downstream
* (openssl, curl, postgresql, nginx) links against libz. Autotools-style
* build: ./configure, make, make check, make DESTDIR install.
*
* DEPENDENCIES
* ============
* Runtime: none. Build-time: a C toolchain (clang/gcc).
*
* NOTE: install goes into ${destdir} exclusively — kappa moves that tree
* into the store. Never point zlib's install at ${prefix} directly.
*/
package "zlib" {
const version = "1.3.2"
const source = "https://zlib.net/zlib-${version}.tar.gz"
sha256 = "bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16"
license = "Zlib"
provides = ["libz", "libz.so.1"]
// No package-level env: optimization flags belong to the user's system
// config (config.kap env {}), which kappa propagates to every build.
prepare {
curl -L -O ${source}
echo "bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16 zlib-${version}.tar.gz" | sha256sum -c -
tar xf zlib-${version}.tar.gz --strip-components=1
}
// --static: only the archive (no libz.so) — consumers link it in, so
// no runtime lib resolution is needed in the store.
build {
./configure --prefix=${prefix} --static
make -j${jobs}
}
check {
make check
}
install {
make DESTDIR=${destdir} install
}
}