stagex/packages/gettext/Containerfile
2024-08-26 11:24:57 -07:00

34 lines
871 B
Docker

FROM scratch AS base
ENV VERSION=0.21
ENV SRC_HASH=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
ENV SRC_FILE=gettext-${VERSION}.tar.xz
ENV SRC_SITE=https://mirrors.kernel.org/gnu/gettext/${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/libxml2 . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
RUN tar -xf ${SRC_FILE}
WORKDIR /gettext-${VERSION}
RUN <<-EOF
set -eux
./configure \
--prefix=/usr \
--enable-threads=posix \
--disable-java \
--enable-static \
--with-included-libxml=no
make -j "$(nproc)"
EOF
FROM build AS install
RUN --network=none make DESTDIR=/rootfs install
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /