32 lines
753 B
Text
32 lines
753 B
Text
|
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
|
||
|
EOF
|
||
|
|
||
|
FROM build AS install
|
||
|
RUN --network=none DESTDIR=/rootfs make install
|
||
|
RUN --network=none find /rootfs -exec touch -hcd "@0" "{}" +
|
||
|
|
||
|
FROM scratch AS package
|
||
|
COPY --from=install /rootfs /
|