git » p11-kit.git » main » tree

[main] / PKGBUILD

pkgname=p11-kit
pkgver=0.25.3
pkgrel=1
arch=('armv7h' 'aarch64')
license=('unknown')
source=("$pkgname-$pkgver.tar.xz")

prepare() {
	cd "$pkgname-$pkgver"
	sed '20,$ d' -i trust/trust-extract-compat &&

	cat >> trust/trust-extract-compat << "EOF"
# Copy existing anchor modifications to /etc/ssl/local
/usr/libexec/make-ca/copy-trust-modifications

# Update trust stores
/usr/sbin/make-ca -r
EOF
}

build() {
	cd "$pkgname-$pkgver"
	mkdir p11-build
	cd    p11-build

	meson setup ..            \
	      --prefix=/usr       \
	      --buildtype=release \
	      -Dtrust_paths=/etc/pki/anchors
	ninja
}

package() {
	cd "$pkgname-$pkgver/p11-build"
	DESTDIR="$pkgdir/" ninja install
	ln -sfv /usr/libexec/p11-kit/trust-extract-compat "$pkgdir"/usr/bin/update-ca-certificates
	ln -sfv ./pkcs11/p11-kit-trust.so "$pkgdir"/usr/lib/libnssckbi.so
}
sha256sums=('d8ddce1bb7e898986f9d250ccae7c09ce14d82f1009046d202a0eb1b428b2adc')