35 lines
901 B
Docker
35 lines
901 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 make DESTDIR=/rootfs install
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
|
|
|
FROM stagex/filesystem as package
|
|
COPY --from=install /rootfs/. /
|