stagex/packages/syslinux/Containerfile

46 lines
1.2 KiB
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-02-17 20:42:53 +00:00
ENV VERSION=6.04-pre1
ENV SRC_HASH=3f6d50a57f3ed47d8234fd0ab4492634eb7c9aaf7dd902f33d3ac33564fd631d
ENV SRC_FILE=syslinux-${VERSION}.tar.xz
ENV SRC_SITE=https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-02-17 20:42:53 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-02-17 20:42:53 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/musl . /
COPY --from=stagex/util-linux . /
COPY --from=stagex/linux-headers . /
RUN tar -xf ${SRC_FILE}
WORKDIR syslinux-${VERSION}
COPY *.patch .
RUN --network=none <<-EOF
patch -p1 < fix-sysmacros.patch
patch -p1 < prevent-pow-optimization.patch
patch -p1 < gcc-10.patch
2024-03-05 08:41:02 +00:00
make -j1 bios efi64 installer
2024-02-17 20:42:53 +00:00
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-03-05 08:41:02 +00:00
RUN make -j1 \
INSTALLROOT="/rootfs" \
MANDIR=/usr/share/man \
BINDIR=/usr/bin \
SBINDIR=/usr/sbin \
LIBDIR=/usr/lib \
install
2024-02-17 20:42:53 +00:00
2024-08-08 07:47:42 +00:00
FROM base AS test
COPY --from=install /rootfs/. /
2024-02-17 20:42:53 +00:00
COPY --from=stagex/musl . /
COPY --from=stagex/busybox . /
RUN syslinux --version
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /