2024-02-09 07:30:28 +00:00
|
|
|
FROM scratch as base
|
|
|
|
ENV VERSION=2.4.6
|
2023-12-05 04:34:07 +00:00
|
|
|
ENV SRC_HASH=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
|
2024-02-09 07:30:28 +00:00
|
|
|
ENV SRC_FILE=libtool-${VERSION}.tar.xz
|
|
|
|
ENV SRC_SITE=https://ftp.gnu.org/gnu/libtool/${SRC_FILE}
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM base as fetch
|
2024-02-10 10:33:18 +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 . /
|
|
|
|
COPY --from=stagex/m4 . /
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN tar -xf ${SRC_FILE}
|
|
|
|
WORKDIR libtool-${VERSION}
|
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr; \
|
|
|
|
make
|
|
|
|
EOF
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM build as install
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
make DESTDIR=/rootfs install
|
|
|
|
EOF
|
2024-02-09 18:19:36 +00:00
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
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/. /
|