2024-08-08 07:47:42 +00:00
|
|
|
FROM scratch AS base
|
2024-07-31 06:38:29 +00:00
|
|
|
ENV VERSION=0.4234
|
|
|
|
ENV SRC_HASH=66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f
|
|
|
|
ENV SRC_FILE=Module-Build-${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://search.cpan.org/CPAN/authors/id/L/LE/LEONT/${SRC_FILE}
|
2024-08-12 21:24:46 +00:00
|
|
|
ENV SOURCE_DATE_EPOCH=1
|
2024-07-31 06:38:29 +00:00
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM base AS fetch
|
2024-07-31 06:38:29 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM fetch AS build
|
2024-07-31 06:38:29 +00:00
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
COPY --from=stagex/perl . /
|
|
|
|
RUN tar -xf ${SRC_FILE}
|
2024-08-26 01:18:52 +00:00
|
|
|
WORKDIR /Module-Build-${VERSION}
|
2024-07-31 06:38:29 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
perl Build.PL installdirs=vendor
|
|
|
|
perl Build
|
|
|
|
EOF
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM build AS install
|
2024-07-31 06:38:29 +00:00
|
|
|
RUN --network=none perl Build install destdir="/rootfs"
|
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-07-31 06:38:29 +00:00
|
|
|
COPY --from=install /rootfs/. /
|