2024-08-17 04:41:04 +00:00
|
|
|
FROM scratch AS base
|
2024-08-16 19:26:04 +00:00
|
|
|
ARG ARCH=x86_64
|
|
|
|
ENV VERSION=1.23.0
|
|
|
|
ENV SRC_HASH=6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c13
|
|
|
|
ENV SRC_FILE=groff-${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://ftp.gnu.org/gnu/groff/${SRC_FILE}
|
|
|
|
|
2024-08-17 04:41:04 +00:00
|
|
|
FROM base AS fetch
|
2024-08-16 19:26:04 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
|
2024-08-17 04:41:04 +00:00
|
|
|
|
|
|
|
FROM fetch AS build
|
2024-08-16 19:26:04 +00:00
|
|
|
COPY --from=stagex/perl . /
|
|
|
|
COPY --from=stagex/m4 . /
|
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
RUN tar -xf $SRC_FILE
|
|
|
|
WORKDIR groff-${VERSION}
|
|
|
|
ENV SOURCE_DATE_EPOCH=1
|
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./configure \
|
|
|
|
--build=${ARCH}-linux-musl \
|
|
|
|
--host=${ARCH}-linux-musl \
|
|
|
|
--prefix=/usr \
|
|
|
|
--without-x \
|
|
|
|
--disable-rpath
|
|
|
|
make -j "$(nproc)"
|
|
|
|
EOF
|
|
|
|
|
2024-08-17 04:41:04 +00:00
|
|
|
FROM build AS install
|
2024-08-16 19:26:04 +00:00
|
|
|
RUN make DESTDIR=/rootfs install
|
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
|
|
|
|
2024-08-17 04:41:04 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-08-16 19:26:04 +00:00
|
|
|
COPY --from=install /rootfs/. /
|