[arch-commits] Commit in p11-kit/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Tue Mar 10 16:19:03 UTC 2020


    Date: Tuesday, March 10, 2020 @ 16:19:03
  Author: heftig
Revision: 377320

0.23.20-3: FS#65769 split libp11-kit

Modified:
  p11-kit/trunk/PKGBUILD

----------+
 PKGBUILD |   48 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-10 16:12:29 UTC (rev 377319)
+++ PKGBUILD	2020-03-10 16:19:03 UTC (rev 377320)
@@ -1,17 +1,15 @@
 # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
 # Contributor: Ionut Biru <ibiru at archlinux.org>
 
-pkgname=p11-kit
+pkgbase=p11-kit
+pkgname=(p11-kit libp11-kit)
 pkgver=0.23.20
-pkgrel=2
-pkgdesc="Provides a way to load and enumerate PKCS#11 modules"
+pkgrel=3
+pkgdesc="Loads and enumerates PKCS#11 modules"
+url="https://p11-glue.freedesktop.org"
 arch=(x86_64)
-url="https://p11-glue.freedesktop.org"
 license=(BSD)
-depends=(glibc libtasn1 libffi systemd)
-makedepends=(gtk-doc git meson)
-provides=(libp11-kit.so)
-install=p11-kit.install
+makedepends=(gtk-doc git meson libtasn1 libffi systemd)
 source=("git+https://github.com/p11-glue/p11-kit?signed#tag=$pkgver")
 sha256sums=('SKIP')
 validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF'  # Stef Walter
@@ -34,12 +32,40 @@
   meson test -C build --print-errorlogs
 }
 
-package() {
-  depends+=(libsystemd.so)
+_pick() {
+  local p="$1" f d; shift
+  for f; do
+    d="$srcdir/$p/${f#$pkgdir/}"
+    mkdir -p "$(dirname "$d")"
+    mv "$f" "$d"
+    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+  done
+}
 
+package_p11-kit() {
+  depends=("libp11-kit=$pkgver-$pkgrel" systemd libp11-kit.so libsystemd.so)
+  install=p11-kit.install
+
   DESTDIR="$pkgdir" meson install -C build
+  ln -sr "$pkgdir/usr/bin/update-ca-trust" "$pkgdir/usr/lib/p11-kit/trust-extract-compat"
+
+  # Split libp11-kit
+  _pick lib "$pkgdir"/usr/include
+  _pick lib "$pkgdir"/usr/lib/{p11-kit-proxy.so,libp11-kit.*}
+  _pick lib "$pkgdir"/usr/lib/{pkcs11,pkgconfig}
+  _pick lib "$pkgdir"/usr/share/{locale,p11-kit}
+
   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit/COPYING
-  ln -sr "$pkgdir/usr/bin/update-ca-trust" "$pkgdir/usr/lib/p11-kit/trust-extract-compat"
 }
 
+package_libp11-kit() {
+  pkgdesc+=" (library)"
+  depends=(glibc libtasn1 libffi)
+  provides=(libp11-kit.so)
+
+  mv lib/* "$pkgdir"
+
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 p11-kit/COPYING
+}
+
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list