brotli

Details
Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-cmake . /
COPY --from=stagex/core-openssl . /
ADD fetch/brotli-${VERSION}.tar.gz .
WORKDIR /brotli-${VERSION}
RUN --network=none <<-EOF
	set -eux
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=OFF
	cmake --build build
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=ON
	cmake --build build
	DESTDIR=/rootfs cmake --install build
	for file in common dec enc; do
		install -D -m 755 build/libbrotli$file.a /rootfs/usr/lib64
	done
	mv /rootfs/usr/lib64 /rootfs/usr/lib
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /