stagex/packages/musl-obstack/Containerfile

37 lines
994 B
Text
Raw Normal View History

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
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
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
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2024-02-05 10:42:27 +00:00
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /