# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=p11-kit pkgver=0.23.16.1 pkgrel=0 pkgdesc="Library for loading and sharing PKCS#11 modules" url="https://p11-glue.freedesktop.org/" arch="all" license="BSD" makedepends="libtasn1-dev libffi-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-trust $pkgname-server" source="https://github.com/p11-glue/p11-kit/releases/download/$pkgver/p11-kit-$pkgver.tar.gz" build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --sysconfdir=/etc \ --prefix=/usr \ --mandir=/usr/share/man \ --with-trust-paths=/etc/ssl/certs/ca-certificates.crt make } check() { cd "$builddir" make check } package() { cd "$builddir" make DESTDIR="$pkgdir" install mkdir -p "$pkgdir"/usr/share/doc/$pkgname mv "${pkgdir}"/etc/pkcs11/pkcs11.conf.example "$pkgdir"/usr/share/doc/$pkgname/ } trust() { pkgdesc="System trust module from $pkgname" mkdir -p "$subpkgdir"/usr/share/p11-kit/modules \ "$subpkgdir"/usr/libexec/p11-kit \ "$subpkgdir"/usr/lib/pkcs11 \ "$subpkgdir"/usr/bin mv "$pkgdir"/usr/libexec/p11-kit/trust-extract-compat \ "$subpkgdir"/usr/libexec/p11-kit/ mv "$pkgdir"/usr/share/p11-kit/modules/p11-kit-trust.module \ "$subpkgdir"/usr/share/p11-kit/modules/ mv "$pkgdir"/usr/lib/pkcs11/p11-kit-trust.so \ "$subpkgdir"/usr/lib/pkcs11/ mv "$pkgdir"/usr/bin/trust "$subpkgdir"/usr/bin/ } server() { pkgdesc="Server and client commands for $pkgname" mkdir -p "$subpkgdir"/usr/lib/pkcs11 \ "$subpkgdir"/usr/libexec/p11-kit \ "$subpkgdir"/etc/init.d mv "$pkgdir"/usr/lib/pkcs11/p11-kit-client.so \ "$subpkgdir"/usr/lib/pkcs11 mv "$pkgdir"/usr/libexec/p11-kit/p11-kit-server \ "$subpkgdir"/usr/libexec/p11-kit } sha512sums="7d0bbd793b43dba081054b4d022a8dbd1d477a3bd6aced72a641087023cf020f1d898899a08e737880e6c810f924814c62497c5ecb19f8322cde42667426a9a7 p11-kit-0.23.16.1.tar.gz"