34 lines
820 B
Docker
34 lines
820 B
Docker
FROM scratch as base
|
|
ENV VERSION=1.6.3
|
|
ENV SRC_HASH=61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210
|
|
ENV SRC_FILE=pkgconf-${VERSION}.tar.xz
|
|
ENV SRC_SITE=https://distfiles.ariadne.space/pkgconf/${SRC_FILE}
|
|
|
|
FROM base as fetch
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
|
|
|
FROM fetch as build
|
|
COPY --from=stagex/busybox . /
|
|
COPY --from=stagex/gcc . /
|
|
COPY --from=stagex/binutils . /
|
|
COPY --from=stagex/make . /
|
|
COPY --from=stagex/musl . /
|
|
RUN tar -xf ${SRC_FILE}
|
|
WORKDIR pkgconf-${VERSION}
|
|
RUN --network=none <<-EOF
|
|
set -eux
|
|
./configure \
|
|
--prefix=/usr
|
|
make
|
|
EOF
|
|
|
|
FROM build as install
|
|
RUN --network=none <<-EOF
|
|
set -eux
|
|
make DESTDIR=/rootfs install
|
|
ln -s pkgconf /rootfs/usr/bin/pkg-config
|
|
EOF
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
|
|
|
FROM scratch as package
|
|
COPY --from=install /rootfs /
|