ocaml

Details
Source
FROM scratch AS build
ARG VERSION
ENV SOURCE_DATE_EPOCH=1
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-libzstd . /
ADD fetch/ocaml-${VERSION}.tar.gz .
WORKDIR /ocaml-${VERSION}
RUN --network=none <<-EOF
	set -eux
	CFLAGS="-fPIC" \
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make -j "$(nproc)"
	make DESTDIR="/rootfs" install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /