From 99d6c55cb9b0498914fb362c60f3c6258e36a71f Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Sat, 3 Feb 2024 07:10:57 -0800 Subject: [PATCH] package musl-fts --- src/core/musl-fts/Dockerfile | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/core/musl-fts/Dockerfile diff --git a/src/core/musl-fts/Dockerfile b/src/core/musl-fts/Dockerfile new file mode 100644 index 0000000..f164b8d --- /dev/null +++ b/src/core/musl-fts/Dockerfile @@ -0,0 +1,54 @@ +ARG REGISTRY=local +FROM ${REGISTRY}/busybox as busybox +FROM ${REGISTRY}/gcc as gcc +FROM ${REGISTRY}/binutils as binutils +FROM ${REGISTRY}/musl as musl +FROM ${REGISTRY}/make as make +FROM ${REGISTRY}/autoconf as autoconf +FROM ${REGISTRY}/automake as automake +FROM ${REGISTRY}/libtool as libtool +FROM ${REGISTRY}/m4 as m4 +FROM ${REGISTRY}/pkgconf as pkgconf + +FROM busybox as base +ENV VERSION=1.2.7 +ENV SRC_FILE=v${VERSION}.tar.gz +ENV SRC_SITE=https://github.com/void-linux/musl-fts/archive/refs/tags/${SRC_FILE} +ENV SRC_HASH=49ae567a96dbab22823d045ffebe0d6b14b9b799925e9ca9274d47d26ff482a6 +COPY --from=gcc . / +COPY --from=binutils . / +COPY --from=make . / +COPY --from=musl . / +COPY --from=autoconf . / +COPY --from=automake . / +COPY --from=libtool . / +COPY --from=pkgconf . / +COPY --from=m4 . / + +FROM base as fetch +RUN wget ${SRC_SITE} +RUN echo "${SRC_HASH} ${SRC_FILE}" | sha256sum -c + +FROM fetch as build +RUN tar -xzf ${SRC_FILE} +WORKDIR musl-fts-${VERSION} +RUN set -eux; \ + ./bootstrap.sh; \ + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var; \ + make + +FROM build as install +USER 0:0 +RUN set -eux; \ + make DESTDIR=/rootfs install; \ + install -Dm644 musl-fts.pc -t /rootfs/usr/lib/pkgconfig/; \ + find /rootfs -exec touch -hcd "@0" "{}" + + +FROM scratch as package +COPY --from=install /rootfs /