stagex/packages/xz/Containerfile

48 lines
1.2 KiB
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-02-14 16:00:24 +00:00
ARG ARCH=x86_64
ENV VERSION=5.6.2
ENV SRC_HASH=92a439948bba24c2bc25bb67a087a19194905209c56b5e600bc94fd2a472e687
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/tukaani-project/xz/archive/refs/tags/${SRC_FILE}
2024-02-14 16:00:24 +00:00
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-02-14 16:00:24 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-08-08 07:47:42 +00:00
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/m4 . /
COPY --from=stagex/perl . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/libtool . /
COPY --from=stagex/gettext . /
COPY --from=stagex/po4a . /
2024-02-14 16:00:24 +00:00
RUN tar -xf ${SRC_FILE}
WORKDIR xz-${VERSION}
RUN --network=none <<-EOF
set -ex
./autogen.sh
./configure \
--build=${ARCH}-linux-musl \
--host=${ARCH}-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
2024-02-14 16:00:24 +00:00
--infodir=/usr/share/info \
--localstatedir=/var \
--disable-rpath \
--disable-werror \
--disable-doc
make -j "$(nproc)"
2024-02-14 16:00:24 +00:00
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-02-14 16:00:24 +00:00
RUN --network=none make DESTDIR="/rootfs" install
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /