Merge remote-tracking branch 'origin/anton/package/pcsc-lite'

This commit is contained in:
Lance R. Vick 2024-02-13 09:45:24 -08:00
commit f7c3f1b68d
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D
6 changed files with 71 additions and 4 deletions

View file

@ -37,7 +37,6 @@ COPY --from=install /rootfs /
COPY --from=busybox . /
RUN /bin/sh <<-EOF
set -eux
EXPECTED_LIBASSUAN_VERSION="${SRC_VERSION}"
LIBASSUAN_FILES_FOUND=\$(ls /usr/lib/ | grep libassuan || true)
if [ -z "\$LIBASSUAN_FILES_FOUND" ]; then
echo "libassuan not found"

View file

@ -36,7 +36,6 @@ COPY --from=install /rootfs /
COPY --from=busybox . /
RUN /bin/sh <<-EOF
set -eux
EXPECTED_LIBGCRYPT_VERSION="${SRC_VERSION}"
LIBGCRYPT_FILES_FOUND=\$(ls /usr/lib/ | grep libgcrypt || true)
if [ -z "\$LIBGCRYPT_FILES_FOUND" ]; then
echo "libgcrypt not found"

View file

@ -36,7 +36,6 @@ COPY --from=install /rootfs /
COPY --from=busybox . /
RUN /bin/sh <<-EOF
set -eux
EXPECTED_LIBGPG_ERROR_VERSION="${SRC_VERSION}"
LIBGPG_ERROR_FILES_FOUND=\$(ls /usr/lib/ | grep libgpg-error || true)
if [ -z "\$LIBGPG_ERROR_FILES_FOUND" ]; then
echo "libgpg-error not found"

View file

@ -40,7 +40,6 @@ COPY --from=busybox . /
RUN ls /usr/lib
RUN /bin/sh <<-EOF
set -eux
EXPECTED_LIBKSBA_VERSION="${SRC_VERSION}"
LIBKSBA_FILES_FOUND=\$(ls /usr/lib/ | grep libksba || true)
if [ -z "\$LIBKSBA_FILES_FOUND" ]; then
echo "libksba not found"

View file

@ -0,0 +1,60 @@
FROM scratch as base
ENV SRC_VERSION=2.0.0
ENV SRC_HASH=d6c3e2b64510e5ed6fcd3323febf2cc2a8e5fda5a6588c7671f2d77f9f189356
ENV SRC_FILE=pcsc-lite-${SRC_VERSION}.tar.bz2
ENV SRC_SITE=https://pcsclite.apdu.fr/files/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch as build
COPY --from=busybox . /
COPY --from=m4 . /
COPY --from=musl . /
COPY --from=gcc . /
COPY --from=binutils . /
COPY --from=make . /
COPY --from=perl . /
COPY --from=flex . /
RUN tar -xvf $SRC_FILE
WORKDIR pcsc-lite-${SRC_VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--disable-libusb \
--enable-libudev \
--disable-maintainer-mode \
--disable-silent-rules \
--without-systemdsystemunitdir \
--enable-ipcdir=/run/pcscd \
--enable-usbdropdir=/usr/lib/pcsc/drivers \
--disable-libsystemd \
--disable-polkit \
--disable-strict \
--disable-libudev \
--enable-static
make
EOF
FROM build as install
RUN make DESTDIR=/rootfs install
FROM base as test
COPY --from=install /rootfs /
COPY --from=busybox . /
RUN /bin/sh <<-EOF
set -eux
PCSC_FILES_FOUND=\$(ls /usr/lib/ | grep pcsc || true)
if [ -z "\$PCSC_FILES_FOUND" ]; then
echo "pcsc-lite not found"
exit 1
fi
EOF
FROM scratch as package
COPY --from=install /rootfs /

View file

@ -453,6 +453,17 @@ out/sed/index.json: \
out/musl/index.json
$(call build,sed)
.PHONY: pcsc-lite
pcsc-lite: out/pcsc-lite/index.json
out/pcsc-lite/index.json: \
src/core/pcsc-lite/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/gcc/index.json \
out/make/index.json \
out/musl/index.json
$(call build,core,pcsc-lite)
.PHONY: xorriso
xorriso: out/xorriso/index.json
out/xorriso/index.json: \