stagex/packages/pcsc-tools/Containerfile

38 lines
962 B
Text
Raw Normal View History

FROM scratch AS base
ENV VERSION=1.7.2
ENV SRC_HASH=fd6fcc25e8140f613b3bf44b02eda4a8a429ee4939fb777f474e2c829f7b472c
2024-06-21 00:01:48 +00:00
ENV SRC_FILE=pcsc-tools-${VERSION}.tar.bz2
ENV SRC_SITE=https://pcsc-tools.apdu.fr/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-06-21 00:01:48 +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-21 00:01:48 +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/flex . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/pcsc-lite . /
RUN tar -xvjf $SRC_FILE
2024-08-26 01:18:52 +00:00
WORKDIR /pcsc-tools-${VERSION}
2024-06-21 00:01:48 +00:00
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make -j "$(nproc)"
EOF
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-06-21 00:01:48 +00:00
RUN --network=none make DESTDIR=/rootfs install
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-06-21 00:01:48 +00:00
COPY --from=install /rootfs/. /