2024-08-08 07:47:42 +00:00
|
|
|
FROM scratch AS base
|
2024-02-15 22:31:08 +00:00
|
|
|
ARG ARCH=x86_64
|
|
|
|
ENV VERSION=5.45
|
|
|
|
ENV SRC_HASH=28c01a5ef1a127ef71758222ca019ba6c6bfa4a8fe20c2b525ce75943ee9da3c
|
|
|
|
ENV SRC_FILE=FILE5_45.tar.gz
|
|
|
|
ENV SRC_SITE=https://github.com/file/file/archive/${SRC_FILE}
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM base AS fetch
|
2024-02-15 22:31:08 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM fetch AS build
|
2024-02-15 22:31:08 +00:00
|
|
|
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 tar -xf ${SRC_FILE}
|
2024-08-26 01:18:52 +00:00
|
|
|
WORKDIR /file-FILE5_45/
|
2024-02-15 22:31:08 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
autoreconf -fvi
|
|
|
|
./configure \
|
|
|
|
--build=${ARCH}-linux-musl \
|
|
|
|
--host=${ARCH}-linux-musl \
|
2024-02-16 00:36:19 +00:00
|
|
|
--prefix=/usr \
|
2024-02-15 22:31:08 +00:00
|
|
|
--datadir=/usr/share
|
|
|
|
make -j "$(nproc)"
|
|
|
|
EOF
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM build AS install
|
2024-02-15 22:31:08 +00:00
|
|
|
RUN --network=none make DESTDIR="/rootfs" install
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-03-01 18:30:23 +00:00
|
|
|
COPY --from=install /rootfs/. /
|