39 lines
1 KiB
Docker
39 lines
1 KiB
Docker
FROM scratch AS base
|
|
ENV VERSION=1.1.39
|
|
ENV SRC_HASH=2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0
|
|
ENV SRC_FILE=libxslt-${VERSION}.tar.xz
|
|
ENV SRC_SITE=https://download.gnome.org/sources/libxslt/1.1/${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 . /
|
|
COPY --from=stagex/perl . /
|
|
COPY --from=stagex/pkgconf . /
|
|
COPY --from=stagex/libtool . /
|
|
COPY --from=stagex/libxml2 . /
|
|
COPY --from=stagex/zlib . /
|
|
COPY --from=stagex/m4 . /
|
|
RUN tar -xf ${SRC_FILE}
|
|
WORKDIR /libxslt-${VERSION}
|
|
RUN --network=none <<-EOF
|
|
set -eux
|
|
./configure \
|
|
--build=x86_64-unknown-linux-musl \
|
|
--host=x86_64-unknown-linux-musl \
|
|
--prefix=/usr \
|
|
--with-python=no \
|
|
--enable-static
|
|
make -j "$(nproc)"
|
|
EOF
|
|
|
|
FROM build AS install
|
|
RUN --network=none make DESTDIR=/rootfs install
|
|
|
|
FROM stagex/filesystem AS package
|
|
COPY --from=install /rootfs/. /
|