1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
5 pkgname=(libsecret libsecret-docs)
8 pkgdesc="Library for storing and retrieving passwords and other secrets"
9 url="https://wiki.gnome.org/Projects/Libsecret"
12 depends=(glib2 libgcrypt tpm2-tss)
13 makedepends=(gobject-introspection vala git meson gi-docgen bash-completion)
14 checkdepends=(python-dbus python-gobject gjs swtpm tpm2-abrmd)
16 _commit=d64530ac70d9723945d68ca079293ea0f9df9e9f # tags/0.20.5^0
17 source=("git+https://gitlab.gnome.org/GNOME/libsecret.git#commit=$_commit")
22 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
28 # Secure memory tests fail in containers
29 sed -i '/test-secmem/d' egg/meson.build
33 arch-meson $pkgbase build -D tpm2=true
34 meson compile -C build
38 mkdir -p "${TPM_PATH:=$PWD/tpm}"
41 swtpm_setup --create-config-files
42 swtpm_setup --tpm2 --tpm-state "$TPM_PATH" --createek --allow-signing \
43 --decryption --overwrite --display
45 swtpm socket --tpm2 --flags startup-clear \
46 --server type=unixio,path="$TPM_PATH/socket" \
47 --ctrl type=unixio,path="$TPM_PATH/socket.ctrl" &
50 tpm2-abrmd --tcti=swtpm:path="$TPM_PATH/socket" \
51 --session --flush-all &
54 trap "kill $_p1 $_p2; wait" EXIT
56 export TCTI=tabrmd:bus_type=session
58 meson test -C build --print-errorlogs
62 dbus-run-session bash -c "$(declare -f _check); _check"
66 optdepends=('org.freedesktop.secrets: secret storage backend')
67 provides=(libsecret-1.so)
69 meson install -C build --destdir "$pkgdir"
71 mkdir -p doc/usr/share
72 mv {"$pkgdir",doc}/usr/share/doc
75 package_libsecret-docs() {
76 pkgdesc+=" (documentation)"