stagex/packages/zip/Containerfile

34 lines
908 B
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-04-10 16:41:17 +00:00
ENV VERSION=30
ENV SRC_HASH=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
ENV SRC_FILE=zip${VERSION}.tar.gz
ENV SRC_SITE=https://fossies.org/linux/misc/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-04-10 16:41:17 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-04-10 16:41:17 +00:00
COPY --from=stagex/binutils . /
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/cmake . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
RUN --network=none tar -xf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /zip${VERSION}
2024-04-10 16:45:02 +00:00
ENV SOURCE_DATE_EPOCH=1
2024-04-10 16:41:17 +00:00
RUN --network=none <<-EOF
set -eux
make -f unix/Makefile prefix=/usr generic
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-04-10 16:41:17 +00:00
RUN --network=none <<-EOF
set -eux
mkdir -p /rootfs/usr/bin/
DESTDIR=/rootfs make -f unix/Makefile prefix=/rootfs/usr MANDIR=rootfs/usr/share/man/man1 install
EOF
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-04-10 16:41:17 +00:00
COPY --from=install /rootfs/. /