stagex/packages/json-glib/Containerfile
2024-09-06 15:09:10 -07:00

59 lines
1.6 KiB
Docker

FROM scratch AS base
ARG ARCH=x86_64
ENV VERSION=1.8.0
ENV SRC_HASH=97ef5eb92ca811039ad50a65f06633f1aae64792789307be7170795d8b319454
ENV SRC_FILE=json-glib-${VERSION}.tar.xz
ENV SRC_SITE=https://download.gnome.org/sources/json-glib/1.8/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch AS build
COPY --from=stagex/python . /
COPY --from=stagex/zlib . /
COPY --from=stagex/bzip2 . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/meson . /
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/pcre2 . /
COPY --from=stagex/python . /
COPY --from=stagex/bison . /
COPY --from=stagex/flex . /
COPY --from=stagex/py-packaging . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/libffi . /
COPY --from=stagex/xz . /
COPY --from=stagex/expat . /
COPY --from=stagex/rhash . /
COPY --from=stagex/libxml2 . /
COPY --from=stagex/util-linux . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/gettext . /
COPY --from=stagex/ninja . /
COPY --from=stagex/glib . /
RUN tar -xf ${SRC_FILE}
WORKDIR /json-glib-${VERSION}
RUN --network=none <<-EOF
set -eux
meson setup \
--default-library=shared \
--prefix=/usr \
-Dgtk_doc=disabled \
. output
meson compile -C output
meson install --no-rebuild -C output
EOF
FROM build AS install
RUN DESTDIR=/rootfs meson install --no-rebuild -C output
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /