2024-02-26 21:24:28 +00:00
|
|
|
FROM scratch AS base
|
2024-03-05 02:52:31 +00:00
|
|
|
ARG ARCH=x86_64
|
2024-02-26 21:24:28 +00:00
|
|
|
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
|
2024-03-05 02:52:31 +00:00
|
|
|
set -eux
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--build=${ARCH}-linux-musl
|
|
|
|
make
|
2024-02-26 21:24:28 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
FROM build AS install
|
|
|
|
RUN --network=none DESTDIR=/rootfs make install
|
|
|
|
RUN --network=none find /rootfs -exec touch -hcd "@0" "{}" +
|
|
|
|
|
2024-03-09 04:03:35 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-03-01 18:30:23 +00:00
|
|
|
COPY --from=install /rootfs/. /
|