# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

_pkgname=xcb-util-keysyms
pkgname=$_pkgname-static
pkgver=0.4.0
pkgrel=3
pkgdesc="Utility libraries for XC Binding - Standard X key constants and conversion to/from keycodes"
arch=('x86_64')
url="https://xcb.freedesktop.org"
license=('custom')
depends=('libxcb>=1.7')
makedepends=('xorg-util-macros' 'xorgproto')
options=(staticlibs)
source=("https://xcb.freedesktop.org/dist/${_pkgname}-${pkgver}.tar.bz2"
        'LICENSE')
sha512sums=('b14b3100c3ae2379f9df799c0780a1ee39267101e58e4c1c6f390f039348ca2b370bb1df203b9bc68a170d664188d9c73e3553a7ba24d98abea3ed353e8dc0c4'
            '62f83468f9d9503a5a8c1ebaac78cbaefe3c485f8bfd7192817ec59254872fe2914ed66ae8b9e7f7a6ef5af283048c11390f44eb8f0f70b1c136ef5c75282e8c')

build() {
  cd ${_pkgname}-${pkgver}
  ./configure --prefix=/usr/static --disable-shared --enable-static
  make
}

check() {
  cd ${_pkgname}-${pkgver}
  make check
}

package() { 
  cd ${_pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -D -m644 "${srcdir}/LICENSE" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
