stagex/packages/skalibs/Containerfile
2024-08-18 16:05:34 -04:00

34 lines
856 B
Docker

FROM scratch as base
ARG ARCH=x86_64
ENV VERSION=2.14.1.1
ENV SRC_HASH=b6b79b816f4ba0b6801676b0ed4179b59c8c7809eeffe26db672e404636befc3
ENV SRC_FILE=skalibs-${VERSION}.tar.gz
ENV SRC_SITE=https://skarnet.org/software/skalibs/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch as build
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
RUN tar -xf ${SRC_FILE}
WORKDIR skalibs-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--enable-shared \
--enable-static \
--prefix=/usr \
--libdir=/usr/lib
make
EOF
FROM build as install
RUN make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /