stagex/packages/meson/Containerfile
2024-02-13 08:16:03 -08:00

25 lines
709 B
Docker

FROM scratch as base
ENV VERSION=1.3.1
ENV SRC_FILE=meson-${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/mesonbuild/meson/releases/download/${VERSION}/${SRC_FILE}
ENV SRC_HASH=6020568bdede1643d4fb41e28215be38eff5d52da28ac7d125457c59e0032ad7
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=busybox . /
COPY --from=musl . /
COPY --from=python . /
COPY --from=py-setuptools . /
COPY --from=zlib . /
RUN tar -xf ${SRC_FILE}
WORKDIR meson-${VERSION}
RUN python setup.py build
FROM build as install
RUN --network=none python setup.py install --root=/rootfs
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM scratch as package
COPY --from=install /rootfs /