p11-kit 0.25.3-1

This commit is contained in:
xhaa123 2024-11-04 00:29:34 +08:00
commit 6874d65341

67
PKGBUILD Normal file
View File

@ -0,0 +1,67 @@
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=(p11-kit libp11-kit)
pkgbase=p11-kit
pkgver=0.25.3
pkgrel=1
pkgdesc="Loads and enumerates PKCS#11 modules"
arch=('x86_64')
url="https://p11-glue.freedesktop.org"
license=('BSD')
depends=('glibc' 'libffi' 'libtasn1' 'systemd')
makedepends=('meson' 'bash-completion' 'make-ca')
source=(https://github.com/p11-glue/p11-kit/releases/download/${pkgver}/${pkgbase}-${pkgver}.tar.xz)
sha256sums=(d8ddce1bb7e898986f9d250ccae7c09ce14d82f1009046d202a0eb1b428b2adc)
prepare() {
cd ${pkgbase}-${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 ${pkgbase}-${pkgver}
future-meson p11-build \
--prefix=/usr \
--buildtype=release \
-Dlibdir=/usr/lib64 \
-Dtrust_paths=/etc/pki/anchors
meson compile -C p11-build
}
package_p11-kit() {
depends=("libp11-kit=${pkgver}-${pkgrel}" 'coreutils' 'systemd' 'make-ca')
cd ${pkgbase}-${pkgver}
meson install -C p11-build --destdir ${pkgdir}
ln -sfv /usr/libexec/p11-kit/trust-extract-compat ${pkgdir}/usr/bin/update-ca-certificates
_pick lib ${pkgdir}/usr/include
_pick lib ${pkgdir}/usr/lib64/{p11-kit-proxy.so,libp11-kit.*}
_pick lib ${pkgdir}/usr/lib64/{pkcs11,pkgconfig}
_pick lib ${pkgdir}/usr/share/p11-kit
}
package_libp11-kit() {
pkgdesc+=" (library)"
mv lib/* ${pkgdir}
}