stagex/packages/libqrencode/Containerfile

39 lines
973 B
Text
Raw Permalink Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-03-08 06:54:13 +00:00
ARG ARCH=x86_64
ENV VERSION=4.1.1
ENV SRC_HASH=da448ed4f52aba6bcb0cd48cac0dd51b8692bccc4cd127431402fca6f8171e8e
ENV SRC_FILE=qrencode-${VERSION}.tar.gz
ENV SRC_SITE=https://fukuchi.org/works/qrencode/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-03-08 06:54:13 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-03-08 06:54:13 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
RUN tar -xzf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /qrencode-${VERSION}
2024-03-08 06:54:13 +00:00
RUN --network=none <<-EOF
set -eux
./configure \
--build=${ARCH}-linux-musl \
--host=${ARCH}-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--with-tests
make -j "$(nproc)"
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-03-08 06:54:13 +00:00
RUN --network=none make DESTDIR="/rootfs" install
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-03-08 06:54:13 +00:00
COPY --from=install /rootfs/. /