lib/libz/ndmake.sh
$ cat ndmake.sh
#!/bin/sh -ue
NAME=libz
VERSION=1.2.8.2025.03.07
RELEASE=2
SOURCE="https://pub.sortix.org/libz/libz-${VERSION}.tar.gz
    0001-Port-inflate-dynamic-table-size-optimization.patch
    0002-Port-ARM-inflate-performance-improvement-patches-chu.patch
    0003-Port-Intel-optimizations-adler32-chunkcopy-to-cloudf.patch
    0004-Backport-Unconditional-refill-for-literals-with-fast.patch"
BUILD_OPT="--enable-static --disable-shared"

build() {
	msg "configuring libz..."
	./configure \
		--prefix="$PREFIX" \
		${BUILD_OPT} || die "configure failed"

	msg "building libz..."
	shin \
		DESTDIR="$PKG" \
		LDFLAGS="${LDFLAGS} -static" || die "shin failed"
	samu -j"$NPROC" || die "samu failed"

	msg "installing libz..."
	samu install || die "samu install failed"
}

. ${0%/*}/../../libsh/libdmake.sh