2024-02-09 07:30:28 +00:00
|
|
|
FROM scratch as base
|
2024-02-05 10:42:27 +00:00
|
|
|
ENV VERSION=1.2.3
|
2024-02-09 07:30:28 +00:00
|
|
|
ENV SRC_HASH=9ffb3479b15df0170eba4480e51723c3961dbe0b461ec289744622db03a69395
|
2024-02-05 10:42:27 +00:00
|
|
|
ENV SRC_FILE=v${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://github.com/void-linux/musl-obstack/archive/refs/tags/${SRC_FILE}
|
|
|
|
|
|
|
|
FROM base as fetch
|
2024-02-09 07:30:28 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
2024-02-05 10:42:27 +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/perl . /
|
|
|
|
COPY --from=stagex/autoconf . /
|
|
|
|
COPY --from=stagex/automake . /
|
|
|
|
COPY --from=stagex/libtool . /
|
|
|
|
COPY --from=stagex/pkgconf . /
|
|
|
|
COPY --from=stagex/m4 . /
|
2024-02-05 10:42:27 +00:00
|
|
|
RUN tar -xzf ${SRC_FILE}
|
|
|
|
WORKDIR musl-obstack-${VERSION}
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./bootstrap.sh
|
|
|
|
./configure --prefix=/usr
|
2024-03-14 07:16:26 +00:00
|
|
|
make -j "$(nproc)"
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2024-02-05 10:42:27 +00:00
|
|
|
|
|
|
|
FROM build as install
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN --network=none make DESTDIR=/rootfs install
|
2024-02-09 18:19:36 +00:00
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
2024-02-05 10:42:27 +00:00
|
|
|
|
2024-03-01 18:30:23 +00:00
|
|
|
FROM stagex/filesystem as package
|
|
|
|
COPY --from=install /rootfs/. /
|