Source
FROM stagex/pallet-gcc-cmake-busybox AS build
ARG VERSION
COPY --from=stagex/user-libgcrypt . /
ADD fetch/libdeflate-${VERSION}.tar.gz .
WORKDIR /libdeflate-${VERSION}
RUN --network=none <<-EOF
set -eux; \
ln -sf /bin/gas /bin/as
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr/lib \
-DCMAKE_BUILD_TYPE=Release \
-DLIBDEFLATE_BUILD_TESTS=OFF \
-DLIBDEFLATE_BUILD_SHARED_LIB=OFF \
-DLIBDEFLATE_USE_SHARED_LIB=OFF
cmake --build build
DESTDIR="/rootfs" cmake --install build
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /