2024-02-09 07:30:28 +00:00
|
|
|
FROM scratch as base
|
|
|
|
ENV VERSION=4.9
|
2023-12-05 04:34:07 +00:00
|
|
|
ENV SRC_HASH=6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181
|
2024-02-09 07:30:28 +00:00
|
|
|
ENV SRC_FILE=sed-${VERSION}.tar.xz
|
|
|
|
ENV SRC_SITE=https://ftp.gnu.org/gnu/sed/${SRC_FILE}
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM base as fetch
|
2024-02-09 07:30:28 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM fetch as build
|
2024-02-15 15:22:38 +00:00
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/musl . /
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN tar -xf sed-${VERSION}.tar.xz
|
|
|
|
WORKDIR sed-${VERSION}
|
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./configure \
|
2024-03-01 18:30:23 +00:00
|
|
|
--prefix=/usr; \
|
2024-03-14 07:16:26 +00:00
|
|
|
make -j "$(nproc)"
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM build as install
|
2024-04-11 20:09:20 +00:00
|
|
|
RUN --network=none make DESTDIR=/rootfs install
|
2023-12-05 04:34:07 +00:00
|
|
|
|
2024-03-01 18:30:23 +00:00
|
|
|
FROM stagex/filesystem as package
|
|
|
|
COPY --from=install /rootfs/. /
|