main/libxkbcommon: build library docs too

This commit is contained in:
Santurysim 2024-09-11 18:50:28 +00:00 committed by Celeste
parent d742c4836a
commit fa868e4220

View file

@ -2,7 +2,7 @@
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=libxkbcommon
pkgver=1.7.0
pkgrel=0
pkgrel=1
pkgdesc="keyboard handling library"
url="https://www.xkbcommon.org/"
arch="all"
@ -17,13 +17,16 @@ makedepends="
wayland-dev
wayland-protocols
xkeyboard-config-dev
doxygen
graphviz
"
subpackages="
$pkgname-static
$pkgname-doc
$pkgname-dev
$pkgname-x11
xkbcli
xkbcli-doc
xkbcli-doc:xkbcli_doc
xkbcli-bash-completion
"
source="https://xkbcommon.org/download/libxkbcommon-$pkgver.tar.xz
@ -33,7 +36,7 @@ source="https://xkbcommon.org/download/libxkbcommon-$pkgver.tar.xz
build() {
abuild-meson \
-Denable-wayland=true \
-Denable-docs=false \
-Denable-docs=true \
-Denable-x11=true \
-Ddefault_library=both \
build
@ -48,6 +51,16 @@ package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C build
}
doc() {
pkgdesc="Keyboard handling library (documentation)"
install_if="docs $pkgname=$pkgver-r$pkgrel"
# XXX: depends on default_doc implementation details
# Library docs are HTML in /usr/share/doc and don't require any special
# processing, while xkbcli docs are man pages. So we move doc directory to
# the subpackage...
amove usr/share/doc/libxkbcommon
}
x11() {
pkgdesc="$pkgdesc (x11 support)"
@ -61,6 +74,13 @@ xkbcli() {
amove usr/libexec/xkbcommon/xkbcli*
}
xkbcli_doc() {
# ... and run default_doc here to let abuild process man pages
default_doc
pkgdesc="xkb command-line tool with interactive debugger (documentation)"
install_if="docs xkbcli=$pkgver-r$pkgrel"
}
bashcomp() {
default_bashcomp