stagex/packages/gperf/Containerfile
2024-04-11 13:09:20 -07:00

30 lines
718 B
Docker

FROM scratch AS base
ENV VERSION=3.1
ENV SRC_HASH=588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2
ENV SRC_FILE=gperf-${VERSION}.tar.gz
ENV SRC_SITE=http://ftp.gnu.org/pub/gnu/gperf/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
RUN --network=none tar -xf ${SRC_FILE}
WORKDIR gperf-${VERSION}
RUN --network=none <<EOF
set -eux
./configure
make -j "$(nproc)"
EOF
FROM build AS install
RUN --network=none DESTDIR=/rootfs make install
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /