archrelease: copy trunk to extra-x86_64
[arch-packages.git] / p11-kit / trunk / PKGBUILD
blob368851cb1c248fb6c50e71d8c987f3d50f422807
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
4 pkgbase=p11-kit
5 pkgname=(p11-kit libp11-kit)
6 pkgver=0.24.1
7 pkgrel=1
8 pkgdesc="Loads and enumerates PKCS#11 modules"
9 url="https://p11-glue.freedesktop.org"
10 arch=(x86_64)
11 license=(BSD)
12 makedepends=(gtk-doc meson libtasn1 libffi systemd bash-completion)
13 source=(https://github.com/p11-glue/p11-kit/releases/download/$pkgver/p11-kit-$pkgver.tar.xz{,.sig})
14 sha256sums=('d8be783efd5cd4ae534cee4132338e3f40f182c3205d23b200094ec85faaaef8'
15             'SKIP')
16 validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF'  # Stef Walter
17               '462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
19 prepare() {
20   cd p11-kit-$pkgver
23 build() {
24   arch-meson p11-kit-$pkgver build \
25     -D gtk_doc=true \
26     -D man=true \
27     -D trust_paths=/etc/ca-certificates/trust-source:/usr/share/ca-certificates/trust-source
28   meson compile -C build
31 check() {
32   meson test -C build --print-errorlogs
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
45 package_p11-kit() {
46   depends=("libp11-kit=$pkgver-$pkgrel" coreutils libp11-kit.so libsystemd.so)
47   install=p11-kit.install
49   meson install -C build --destdir "$pkgdir"
50   ln -srf "$pkgdir/usr/bin/update-ca-trust" "$pkgdir/usr/lib/p11-kit/trust-extract-compat"
52   # Split libp11-kit
53   _pick lib "$pkgdir"/usr/include
54   _pick lib "$pkgdir"/usr/lib/{p11-kit-proxy.so,libp11-kit.*}
55   _pick lib "$pkgdir"/usr/lib/{pkcs11,pkgconfig}
56   _pick lib "$pkgdir"/usr/share/{locale,p11-kit}
58   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit-$pkgver/COPYING
61 package_libp11-kit() {
62   pkgdesc+=" (library)"
63   depends=(glibc libtasn1 libffi)
64   provides=(libp11-kit.so)
66   mv lib/* "$pkgdir"
68   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit-$pkgver/COPYING
71 # vim:set sw=2 et: