diff --git a/packages/libassuan/Containerfile b/packages/libassuan/Containerfile index 4232ef5..33cf94d 100644 --- a/packages/libassuan/Containerfile +++ b/packages/libassuan/Containerfile @@ -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" diff --git a/packages/libgcrypt/Containerfile b/packages/libgcrypt/Containerfile index 20014fd..a0a8059 100644 --- a/packages/libgcrypt/Containerfile +++ b/packages/libgcrypt/Containerfile @@ -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" diff --git a/packages/libgpg-error/Containerfile b/packages/libgpg-error/Containerfile index b683464..1f26e9c 100644 --- a/packages/libgpg-error/Containerfile +++ b/packages/libgpg-error/Containerfile @@ -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" diff --git a/packages/libksba/Containerfile b/packages/libksba/Containerfile index c4c60f3..77c59f3 100644 --- a/packages/libksba/Containerfile +++ b/packages/libksba/Containerfile @@ -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" diff --git a/packages/pcsc-lite/Containerfile b/packages/pcsc-lite/Containerfile new file mode 100644 index 0000000..63b4f93 --- /dev/null +++ b/packages/pcsc-lite/Containerfile @@ -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 / \ No newline at end of file diff --git a/src/packages.mk b/src/packages.mk index a65cd6f..9025c14 100644 --- a/src/packages.mk +++ b/src/packages.mk @@ -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: \