stagex/packages/bzip2/Containerfile

30 lines
770 B
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-03-09 12:35:31 +00:00
ARG ARCH=x86_64
ENV VERSION=1.0.8
ENV SRC_HASH=ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
ENV SRC_FILE=bzip2-${VERSION}.tar.gz
ENV SRC_SITE=https://sourceware.org/pub/bzip2/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-03-09 12:35:31 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-03-09 12:35:31 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
RUN tar -xf ${SRC_FILE}
WORKDIR bzip2-${VERSION}
RUN --network=none <<-EOF
set -ex
make -j "$(nproc)" -f Makefile-libbz2_so all
make -j "$(nproc)" all
2024-03-09 12:35:31 +00:00
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-04-11 20:09:20 +00:00
RUN --network=none make PREFIX="/rootfs/usr" install
2024-03-09 12:35:31 +00:00
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-03-09 12:35:31 +00:00
COPY --from=install /rootfs/. /