stagex/packages/ccid/Containerfile

42 lines
1 KiB
Text
Raw Permalink Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-06-20 22:41:21 +00:00
ENV VERSION=1.5.5
ENV SRC_HASH=194708f75fe369d45dd7c15e8b3e8a7db8b49cfc5557574ca2a2e76ef12ca0ca
ENV SRC_FILE=ccid-${VERSION}.tar.bz2
ENV SRC_SITE=https://ccid.apdu.fr/files/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-06-20 22:41:21 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-06-20 22:41:21 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/m4 . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/pcsc-lite . /
COPY --from=stagex/flex . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/libusb . /
COPY --from=stagex/zlib . /
RUN tar -xvf $SRC_FILE
2024-08-26 01:18:52 +00:00
WORKDIR /ccid-${VERSION}
2024-06-20 22:41:21 +00:00
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-twinserial
make -j "$(nproc)"
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-06-20 22:41:21 +00:00
RUN --network=none make DESTDIR=/rootfs install
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-06-20 22:41:21 +00:00
COPY --from=install /rootfs/. /