stagex/packages/lzip/Containerfile

31 lines
754 B
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-02-14 18:36:15 +00:00
ARG ARCH=x86_64
ENV VERSION=1.24
ENV SRC_HASH=d42659229b10e066eeb6e81eb673cdd893b672e512d26719c2d95975556ca56c
ENV SRC_FILE=lzip-${VERSION}.tar.gz
ENV SRC_SITE=http://download.savannah.gnu.org/releases/lzip/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-02-14 18:36:15 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-08-08 07:47:42 +00:00
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
2024-02-14 18:36:15 +00:00
RUN tar -xzf ${SRC_FILE}
WORKDIR lzip-${VERSION}
RUN --network=none <<-EOF
set -ex
./configure \
--prefix=/usr
make -j "$(nproc)"
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-02-14 18:36:15 +00:00
RUN --network=none make DESTDIR="/rootfs" install
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /