feat: package opensc
This commit is contained in:
parent
6b6a67beaa
commit
7cb126d083
2 changed files with 86 additions and 0 deletions
60
packages/opensc/Containerfile
Normal file
60
packages/opensc/Containerfile
Normal file
|
@ -0,0 +1,60 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=0.25.1
|
||||
ENV SRC_HASH=989e6305900d4f2f56ef84aa0da07c044459b4f8a508957a4cdefce6a1367c7b
|
||||
ENV SRC_FILE=${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/opensc/opensc/archive/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/make . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/util-linux . /
|
||||
COPY --from=stagex/perl . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/ncurses . /
|
||||
COPY --from=stagex/readline . /
|
||||
COPY --from=stagex/autoconf . /
|
||||
COPY --from=stagex/gettext . /
|
||||
COPY --from=stagex/pcsc-lite . /
|
||||
COPY --from=stagex/automake . /
|
||||
COPY --from=stagex/libtool . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/m4 . /
|
||||
COPY --from=stagex/zlib . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR OpenSC-${VERSION}
|
||||
ENV CFLAGS="-U_FORTIFY_SOURCE -Wno-error"
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
./bootstrap
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var \
|
||||
--enable-zlib \
|
||||
--enable-readline \
|
||||
--enable-openssl \
|
||||
--enable-pcsc \
|
||||
--enable-sm \
|
||||
--enable-piv-sm
|
||||
make -j "$(nproc)"
|
||||
make -C src/tools
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
make DESTDIR=/rootfs install
|
||||
install -D -m644 etc/opensc.conf /rootfs/etc/opensc.conf
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
|
@ -1376,6 +1376,32 @@ out/openpgp-card-tools/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,openpgp-card-tools)
|
||||
|
||||
.PHONY: opensc
|
||||
opensc: out/opensc/index.json
|
||||
out/opensc/index.json: \
|
||||
packages/opensc/Containerfile \
|
||||
out/autoconf/index.json \
|
||||
out/automake/index.json \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/gettext/index.json \
|
||||
out/libtool/index.json \
|
||||
out/linux-headers/index.json \
|
||||
out/m4/index.json \
|
||||
out/make/index.json \
|
||||
out/musl/index.json \
|
||||
out/ncurses/index.json \
|
||||
out/openssl/index.json \
|
||||
out/pcsc-lite/index.json \
|
||||
out/perl/index.json \
|
||||
out/pkgconf/index.json \
|
||||
out/readline/index.json \
|
||||
out/util-linux/index.json \
|
||||
out/zlib/index.json
|
||||
$(call build,opensc)
|
||||
|
||||
.PHONY: openssl
|
||||
openssl: out/openssl/index.json
|
||||
out/openssl/index.json: \
|
||||
|
|
Loading…
Reference in a new issue