PKGBUILD 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  3. # Contributor: Ionut Biru <ibiru@archlinux.org>
  4. pkgbase=p11-kit
  5. pkgname=(p11-kit libp11-kit)
  6. pkgver=0.24.0
  7. pkgrel=2
  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=(BSD)
  14. makedepends=(gtk-doc meson libtasn1 libffi bash-completion)
  15. source=(https://github.com/p11-glue/p11-kit/releases/download/$pkgver/p11-kit-$pkgver.tar.xz{,.sig})
  16. sha256sums=('81e6140584f635e4e956a1b93a32239acf3811ff5b2d3a5c6094e94e99d2c685'
  17. 'SKIP')
  18. validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF' # Stef Walter
  19. '462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
  20. prepare() {
  21. cd p11-kit-$pkgver
  22. }
  23. build() {
  24. arch-meson p11-kit-$pkgver build \
  25. --buildtype debugoptimized \
  26. -D gtk_doc=true \
  27. -D man=true \
  28. -D trust_paths=/etc/ca-certificates/trust-source:/usr/share/ca-certificates/trust-source \
  29. -D systemd=disabled
  30. meson compile -C build
  31. }
  32. check() {
  33. meson test -C build --print-errorlogs
  34. }
  35. _pick() {
  36. local p="$1" f d; shift
  37. for f; do
  38. d="$srcdir/$p/${f#$pkgdir/}"
  39. mkdir -p "$(dirname "$d")"
  40. mv "$f" "$d"
  41. rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  42. done
  43. }
  44. package_p11-kit() {
  45. depends=("libp11-kit=$pkgver-$pkgrel" coreutils libp11-kit.so)
  46. meson install -C build --destdir "$pkgdir"
  47. ln -srf "$pkgdir/usr/bin/update-ca-trust" "$pkgdir/usr/lib/p11-kit/trust-extract-compat"
  48. # Split libp11-kit
  49. _pick lib "$pkgdir"/usr/include
  50. _pick lib "$pkgdir"/usr/lib/{p11-kit-proxy.so,libp11-kit.*}
  51. _pick lib "$pkgdir"/usr/lib/{pkcs11,pkgconfig}
  52. _pick lib "$pkgdir"/usr/share/{locale,p11-kit}
  53. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit-$pkgver/COPYING
  54. }
  55. package_libp11-kit() {
  56. pkgdesc+=" (library)"
  57. depends=(glibc libtasn1 libffi)
  58. provides=(libp11-kit.so)
  59. mv lib/* "$pkgdir"
  60. install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit-$pkgver/COPYING
  61. }
  62. # vim:set ts=2 sw=2 et: