PKGBUILD 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
  2. # Contributor (Arch): Ionut Biru <ibiru@archlinux.org>
  3. # Maintainer: David P. <megver83@parabola.nu>
  4. pkgbase=p11-kit
  5. pkgname=(p11-kit libp11-kit)
  6. pkgver=0.23.20
  7. pkgrel=5
  8. pkgrel+=.nonsystemd1
  9. pkgdesc="Loads and enumerates PKCS#11 modules"
  10. url="https://p11-glue.freedesktop.org"
  11. arch=(x86_64)
  12. arch+=(i686 armv7h)
  13. license=(BSD3)
  14. makedepends=(gtk-doc git meson libtasn1 libffi)
  15. source=("git+https://github.com/p11-glue/p11-kit?signed#tag=$pkgver")
  16. sha256sums=('SKIP')
  17. validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF' # Stef Walter
  18. '462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
  19. prepare() {
  20. cd p11-kit
  21. }
  22. build() {
  23. arch-meson p11-kit build \
  24. --buildtype debugoptimized \
  25. -D gtk_doc=true \
  26. -D man=true \
  27. -D systemd=disabled \
  28. -D trust_paths=/etc/ca-certificates/trust-source:/usr/share/ca-certificates/trust-source
  29. ninja -C build
  30. }
  31. check() {
  32. meson test -C build --print-errorlogs
  33. }
  34. _pick() {
  35. local p="$1" f d; shift
  36. for f; do
  37. d="$srcdir/$p/${f#$pkgdir/}"
  38. mkdir -p "$(dirname "$d")"
  39. mv "$f" "$d"
  40. rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  41. done
  42. }
  43. package_p11-kit() {
  44. depends=("libp11-kit=$pkgver-$pkgrel" libp11-kit.so)
  45. DESTDIR="$pkgdir" meson install -C build
  46. ln -sr "$pkgdir/usr/bin/update-ca-trust" "$pkgdir/usr/lib/p11-kit/trust-extract-compat"
  47. # Split libp11-kit
  48. _pick lib "$pkgdir"/usr/include
  49. _pick lib "$pkgdir"/usr/lib/{p11-kit-proxy.so,libp11-kit.*}
  50. _pick lib "$pkgdir"/usr/lib/{pkcs11,pkgconfig}
  51. _pick lib "$pkgdir"/usr/share/{locale,p11-kit}
  52. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit/COPYING
  53. }
  54. package_libp11-kit() {
  55. pkgdesc+=" (library)"
  56. depends=(glibc libtasn1 libffi)
  57. provides=(libp11-kit.so)
  58. mv lib/* "$pkgdir"
  59. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit/COPYING
  60. }
  61. # vim:set ts=2 sw=2 et: