stagex/packages/cpio/Containerfile

36 lines
987 B
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-02-09 07:30:28 +00:00
ENV VERSION=2.15
2024-01-31 11:15:42 +00:00
ENV SRC_HASH=efa50ef983137eefc0a02fdb51509d624b5e3295c980aa127ceee4183455499e
2024-02-09 07:30:28 +00:00
ENV SRC_FILE=cpio-${VERSION}.tar.gz
ENV SRC_SITE=https://ftp.gnu.org/gnu/cpio/${SRC_FILE}
2024-01-31 11:15:42 +00:00
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-01-31 11:15:42 +00:00
2024-08-08 07:47:42 +00:00
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
2024-02-13 17:13:17 +00:00
RUN tar -xzf ${SRC_FILE}
WORKDIR cpio-${VERSION}
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
2024-01-31 11:15:42 +00:00
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--prefix=/usr \
--bindir=/usr/bin \
2024-01-31 11:15:42 +00:00
--mandir=/usr/share/man \
2024-02-15 12:57:43 +00:00
--infodir=/usr/share/info \
gl_cv_func_getcwd_path_max="no, but it is partly working"
make -j "$(nproc)"
2024-02-09 07:30:28 +00:00
EOF
2024-01-31 11:15:42 +00:00
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-04-11 20:09:20 +00:00
RUN --network=none make DESTDIR=/rootfs install
2024-01-31 11:15:42 +00:00
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /