2024-08-16 19:26:04 +00:00
|
|
|
|
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.17
|
2024-08-17 04:41:04 +00:00
|
|
|
ENV SRC_HASH=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
|
2024-08-16 19:26:04 +00:00
|
|
|
ENV SRC_FILE=libiconv-${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://ftp.gnu.org/gnu/libiconv/${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/musl . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/bash . /
|
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/openssl . /
|
|
|
|
RUN tar -xf ${SRC_FILE}
|
2024-08-26 01:18:52 +00:00
|
|
|
WORKDIR /libiconv-${VERSION}
|
2024-08-16 19:26:04 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
2024-08-17 14:33:38 +00:00
|
|
|
./configure \
|
2024-08-16 19:26:04 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--enable-openssl \
|
|
|
|
--disable-openssl-runtime
|
2024-08-17 04:41:04 +00:00
|
|
|
make -j "$(nproc)"
|
2024-08-16 19:26:04 +00:00
|
|
|
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/. /
|