2024-02-09 07:30:28 +00:00
|
|
|
FROM scratch as base
|
|
|
|
ENV VERSION=2.12.1
|
2023-12-05 04:34:07 +00:00
|
|
|
ENV SRC_HASH=1090e62c5a1900429f63e4681263b96e7829876ccbc66cf2d9266cd589f67286
|
2024-02-09 07:30:28 +00:00
|
|
|
ENV SRC_FILE=libxml2-v${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${VERSION}/${SRC_FILE}
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM base as fetch
|
2024-02-10 13:51:03 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM fetch as build
|
2024-02-09 07:30:28 +00:00
|
|
|
COPY --from=busybox . /
|
|
|
|
COPY --from=gcc . /
|
|
|
|
COPY --from=binutils . /
|
|
|
|
COPY --from=make . /
|
|
|
|
COPY --from=musl . /
|
|
|
|
COPY --from=python . /
|
2024-02-10 13:51:03 +00:00
|
|
|
COPY --from=perl . /
|
2024-02-09 07:30:28 +00:00
|
|
|
COPY --from=autoconf . /
|
|
|
|
COPY --from=automake . /
|
|
|
|
COPY --from=pkgconf . /
|
|
|
|
COPY --from=libtool . /
|
2024-02-10 15:49:52 +00:00
|
|
|
COPY --from=zlib . /
|
2024-02-09 07:30:28 +00:00
|
|
|
COPY --from=m4 . /
|
|
|
|
RUN tar -xf ${SRC_FILE}
|
|
|
|
WORKDIR libxml2-v${VERSION}
|
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
sh autogen.sh
|
2023-12-05 04:34:07 +00:00
|
|
|
./configure \
|
|
|
|
--build=x86_64-unknown-linux-musl \
|
|
|
|
--host=x86_64-unknown-linux-musl \
|
|
|
|
--target=x86_64-unknown-linux-musl \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
2024-02-10 15:49:52 +00:00
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--enable-static \
|
|
|
|
--with-zlib \
|
|
|
|
--with-python=/usr/bin/python3
|
2023-12-16 23:50:40 +00:00
|
|
|
make
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM build as install
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
make DESTDIR=/rootfs install
|
2024-02-10 16:37:49 +00:00
|
|
|
rm -rf /rootfs/usr/lib/python3.12/site-packages/__pycache__
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2024-02-09 18:19:36 +00:00
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
2023-12-05 04:34:07 +00:00
|
|
|
|
2023-12-12 17:45:39 +00:00
|
|
|
FROM scratch as package
|
2023-12-16 23:50:40 +00:00
|
|
|
COPY --from=install /rootfs /
|