feat: package pcsc-tools

This commit is contained in:
Lance R. Vick 2024-06-20 17:01:48 -07:00
parent f878587e95
commit 70902534df
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D
3 changed files with 61 additions and 0 deletions

View file

@ -12,6 +12,8 @@ COPY --from=stagex/busybox . /
COPY --from=stagex/m4 . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/ccid . /
COPY --from=stagex/libusb . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /

View file

@ -0,0 +1,37 @@
FROM scratch as base
ENV VERSION=1.7.1
ENV SRC_HASH=0d024b589e15d79eac8506cd67df7b53cf91e9e6a493c8319f33cd29b5f36426
ENV SRC_FILE=pcsc-tools-${VERSION}.tar.bz2
ENV SRC_SITE=https://pcsc-tools.apdu.fr/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch as build
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
WORKDIR pcsc-tools-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make -j "$(nproc)"
EOF
FROM build as install
RUN --network=none make DESTDIR=/rootfs install
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /

View file

@ -220,6 +220,7 @@ out/ccid/index.json: \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/libusb/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
@ -1395,10 +1396,12 @@ out/pcsc-lite/index.json: \
packages/pcsc-lite/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/ccid/index.json \
out/eudev/index.json \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/libusb/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
@ -1406,6 +1409,25 @@ out/pcsc-lite/index.json: \
out/pkgconf/index.json
$(call build,pcsc-lite)
.PHONY: pcsc-tools
pcsc-tools: out/pcsc-tools/index.json
out/pcsc-tools/index.json: \
packages/pcsc-tools/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/ccid/index.json \
out/eudev/index.json \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/libusb/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/perl/index.json \
out/pkgconf/index.json
$(call build,pcsc-tools)
.PHONY: perl
perl: out/perl/index.json
out/perl/index.json: \