PKGBUILDs/libxkbcommon/static/PKGBUILD

51 lines
1.4 KiB
Bash

# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: Mladen Pejakovic <pejakm@gmail.com>
_pkgname=libxkbcommon
pkgname=$_pkgname-static
pkgver=1.0.3
pkgrel=1
pkgdesc="Keymap handling library for toolkits and window systems"
url="https://xkbcommon.org/"
arch=(x86_64)
license=(custom)
depends=(libxcb-static xkeyboard-config libxml2-static wayland-static libxml2-static)
makedepends=(xkeyboard-config libxml2 libxcb wayland wayland-protocols doxygen
git meson)
checkdepends=(xorg-server-xvfb libgl)
options=(!emptydirs !docs staticlibs)
_commit=c60b77ea512bef92e481be38972b58dd71a34180 # tags/xkbcommon-1.0.3^0
source=("git+https://github.com/xkbcommon/libxkbcommon#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd $_pkgname
git describe --tags | sed 's/^xkbcommon-//;s/-/+/g'
}
prepare() {
cd $_pkgname
}
build() {
export PKG_CONFIG_PATH=/usr/static/lib/pkgconfig:/usr/lib/pkgconfig
export PATH=$PWD:$PATH
printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config
chmod +x pkg-config
arch-meson $_pkgname build \
--prefix /usr/static \
--default-library static \
-Denable-docs=false
meson compile -C build
}
check() {
xvfb-run -s '-nolisten local' meson test -C build --print-errorlogs
}
package() {
DESTDIR="$pkgdir" meson install -C build
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $_pkgname/LICENSE
}