pcsclite: add new package (#32129)

This commit is contained in:
Olivier Cessenat 2022-08-19 18:22:15 +02:00 committed by GitHub
parent e1bce8c577
commit 362cdc5437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,50 @@
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Pcsclite(AutotoolsPackage):
"""PCSC lite project
Middleware to access a smart card using SCard API (PC/SC)."""
homepage = "https://pcsclite.apdu.fr"
url = "https://pcsclite.apdu.fr/files/pcsc-lite-1.9.8.tar.bz2"
git = "https://salsa.debian.org/rousseau/PCSC.git"
maintainers = ["cessenat"]
version("master", branch="master")
version("1.9.8", sha256="502d80c557ecbee285eb99fe8703eeb667bcfe067577467b50efe3420d1b2289")
# no libudev/systemd package currently in spack
variant("libudev", default=False, description="Build with libudev")
depends_on("flex", type="build")
depends_on("libusb")
depends_on("autoconf", type="build")
depends_on("autoconf-archive", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
def autoreconf(self, spec, prefix):
pass
@when("@master")
def autoreconf(self, spec, prefix):
bootstrap = Executable("./bootstrap")
bootstrap()
def configure_args(self):
args = []
# no libudev/systemd package currently in spack
args.append("--disable-libsystemd")
args.extend(self.enable_or_disable("libudev"))
args.append("--with-systemdsystemunitdir=no")
return args