distributable:
  url: https://github.com/p11-glue/p11-kit/releases/download/{{ version }}/p11-kit-{{ version }}.tar.xz
  strip-components: 1

versions:
  github: p11-glue/p11-kit
  strip: / \(stable\)$/

provides:
  - bin/p11-kit
  - bin/trust

dependencies:
  sourceware.org/libffi: ^3
  curl.se/ca-certs: '*'
  gnu.org/libtasn1: ^4
  gnu.org/gettext: '*'

build:
  dependencies:
    freedesktop.org/pkg-config: '*'
  script: |-
    ./configure --prefix={{prefix}} --with-trust-paths={{deps.curl.se/ca-certs}}/ssl
    make -j {{ hw.concurrency }} install

test:
  script: p11-kit list-modules
