stagex/packages/nasm/Containerfile

33 lines
861 B
Text
Raw Normal View History

2024-09-16 22:26:08 +00:00
FROM scratch AS base
2024-09-11 16:21:27 +00:00
ENV VERSION=2.16.03
2024-09-16 22:26:08 +00:00
ENV SRC_HASH=1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148
2024-09-11 16:21:27 +00:00
ENV SRC_FILE=nasm-${VERSION}.tar.xz
2024-09-16 22:26:08 +00:00
ENV SRC_SITE=https://www.nasm.us/pub/nasm/releasebuilds/${VERSION}/${SRC_FILE}
2024-09-11 16:21:27 +00:00
2024-09-16 22:26:08 +00:00
FROM base AS fetch
2024-09-11 16:21:27 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-09-16 22:26:08 +00:00
FROM fetch AS build
2024-09-11 16:21:27 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/perl . /
RUN tar -xf ${SRC_FILE}
2024-09-16 22:26:08 +00:00
WORKDIR /nasm-${VERSION}
2024-09-11 16:21:27 +00:00
RUN --network=none <<-EOF
2024-09-16 22:26:08 +00:00
set -eux
./configure \
2024-09-11 16:21:27 +00:00
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
2024-09-16 22:26:08 +00:00
--prefix=/usr
make -j "$(nproc)"
2024-09-11 16:21:27 +00:00
EOF
FROM build AS install
RUN --network=none DESTDIR=/rootfs make install
FROM stagex/filesystem AS package
2024-09-16 22:26:08 +00:00
COPY --from=install /rootfs/. /