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)
15 _commit=d64530ac70d9723945d68ca079293ea0f9df9e9f # tags/0.20.5^0
16 source=("git+https://gitlab.gnome.org/GNOME/libsecret.git#commit=$_commit")
21 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
27 # Secure memory tests fail in containers
28 sed -i '/test-secmem/d' egg/meson.build
32 arch-meson $pkgbase build -D tpm2=true
33 meson compile -C build
37 mkdir -p "${TPM_PATH:=$PWD/tpm}"
40 swtpm_setup --create-config-files
41 swtpm_setup --tpm2 --tpm-state "$TPM_PATH" --createek --allow-signing \
42 --decryption --overwrite --display
44 swtpm socket --tpm2 --flags startup-clear \
45 --server type=unixio,path="$TPM_PATH/socket" \
46 --ctrl type=unixio,path="$TPM_PATH/socket.ctrl" &
49 tpm2-abrmd --tcti=swtpm:path="$TPM_PATH/socket" \
50 --session --flush-all &
53 trap "kill $_p1 $_p2; wait" EXIT
55 export TCTI=tabrmd:bus_type=session
57 meson test -C build --print-errorlogs
61 dbus-run-session bash -c "$(declare -f _check); _check"
65 optdepends=('org.freedesktop.secrets: secret storage backend')
66 provides=(libsecret-1.so)
68 meson install -C build --destdir "$pkgdir"
70 mkdir -p doc/usr/share
71 mv {"$pkgdir",doc}/usr/share/doc
74 package_libsecret-docs() {
75 pkgdesc+=" (documentation)"