2024-02-18 07:11:04 +00:00
|
|
|
FROM scratch as base
|
|
|
|
ENV VERSION=4.2
|
|
|
|
ENV SRC_HASH=64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527
|
|
|
|
ENV SRC_FILE=dosfstools-${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://github.com/dosfstools/dosfstools/releases/download/v${VERSION}/${SRC_FILE}
|
|
|
|
|
|
|
|
FROM base as fetch
|
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
|
|
|
|
|
|
|
FROM fetch as build
|
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/m4 . /
|
|
|
|
COPY --from=stagex/libtool . /
|
|
|
|
COPY --from=stagex/perl . /
|
|
|
|
COPY --from=stagex/autoconf . /
|
|
|
|
COPY --from=stagex/automake . /
|
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
RUN tar -xzf ${SRC_FILE}
|
|
|
|
WORKDIR dosfstools-${VERSION}
|
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./autogen.sh
|
|
|
|
./configure \
|
|
|
|
--build=x86_64-unknown-linux-musl \
|
|
|
|
--host=x86_64-unknown-linux-musl \
|
|
|
|
--prefix=/usr \
|
2024-03-01 18:30:23 +00:00
|
|
|
--sbindir=/usr/sbin \
|
2024-02-18 07:11:04 +00:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--enable-compat-symlinks
|
|
|
|
EOF
|
|
|
|
|
|
|
|
FROM build as install
|
|
|
|
RUN --network=none make DESTDIR=/rootfs install
|
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
|
|
|
|
2024-03-01 18:30:23 +00:00
|
|
|
FROM stagex/filesystem as package
|
|
|
|
COPY --from=install /rootfs/. /
|