summaryrefslogtreecommitdiff
path: root/nonsystemd/p11-kit/PKGBUILD
blob: cb2dcfe3701c95c146bdc350fe2c36f8b48c0f4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor (Arch): Ionut Biru <ibiru@archlinux.org>

pkgname=p11-kit
pkgver=0.23.18.1
pkgrel=1
pkgrel+=.nonsystemd1
pkgdesc="Provides a way to load and enumerate PKCS#11 modules"
arch=(x86_64 i686 armv7h)
url="https://p11-glue.freedesktop.org"
license=(BSD)
depends=(glibc libtasn1 libffi)
makedepends=(gtk-doc git meson)
source=("git+https://github.com/p11-glue/p11-kit?signed#tag=$pkgver"
        0001-Build-and-install-libnssckbi-p11-kit.so.patch)
sha256sums=('SKIP'
            'e832eece10587ac50ae42ca4515786b51e67fea0647716061e51cd94f5e058cd')
validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF'  # Stef Walter
              '462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno

prepare() {
  cd p11-kit

  # Build and install an additional library (libnssckbi-p11-kit.so) which
  # is a copy of p11-kit-trust.so but uses the same label for root certs as
  # libnssckbi.so ("Builtin Object Token" instead of "Default Trust")
  # https://bugs.freedesktop.org/show_bug.cgi?id=66161
  patch -Np1 -i ../0001-Build-and-install-libnssckbi-p11-kit.so.patch
}

build() {
  arch-meson p11-kit build \
    -D gtk_doc=true \
    -D man=true \
    -D trust_paths=/etc/ca-certificates/trust-source:/usr/share/ca-certificates/trust-source \
    -D systemd=disabled
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit/COPYING
  ln -srf "$pkgdir/usr/bin/update-ca-trust" "$pkgdir/usr/lib/p11-kit/trust-extract-compat"
}

# vim:set ts=2 sw=2 et: