stagex/packages/gmp/Containerfile

36 lines
962 B
Text
Raw Normal View History

2024-02-26 21:24:28 +00:00
FROM scratch AS base
# https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
ENV VERSION=6.3.0
ENV SRC_HASH=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
ENV SRC_FILE=gmp-${VERSION}.tar.xz
ENV SRC_SITE=https://gmplib.org/download/gmp/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/libtool . /
COPY --from=stagex/m4 . /
COPY --from=stagex/gcc . /
RUN --network=none tar -xf ${SRC_FILE}
WORKDIR gmp-${VERSION}
RUN --network=none <<EOF
set -eux
./configure --prefix=/usr
make
EOF
FROM build AS install
RUN --network=none DESTDIR=/rootfs make install
RUN --network=none find /rootfs -exec touch -hcd "@0" "{}" +
FROM scratch AS package
COPY --from=install /rootfs /