#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=xkeyboard-config
pkgver=2.38
pkgrel=01
pkgdesc="X keyboard configuration files"
arch=(any)
url="https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config"
makedepends=('xorg-xkbcomp' 'libxslt' 'python' 'meson') # 'git')
provides=('xkbdata')
replaces=('xkbdata')
conflicts=('xkbdata')
source=(https://xorg.freedesktop.org/archive/individual/data/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig})

#pkgver() {
#  cd $pkgname
#  git describe --long | sed "s/$pkgname//" | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;' | sed 's/+//'
#}

build() {
  arch-meson ${pkgname}-${pkgver}  build \
	-D xkb-base="/usr/share/X11/xkb" \
	-D compat-rules=true \
	-D xorg-rules-symlinks=true

  # Print config
  meson configure build

  ninja -C build

 }
 
 package() { 

  DESTDIR="$pkgdir" ninja -C build install

  install -m755 -d "${pkgdir}/var/lib/xkb"
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 ${pkgname}-${pkgver}/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
  #install -m644 ${pkgname}/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"

}

#---- license gpg-key sha256sums ----

license=('custom')

##validpgpkeys=('15CFA5C595041D2CCBEA155F1732AA424A0E86B4') # "Sergey Udaltsov (For GNOME-related tasks) <svu@gnome.org>"
validpgpkeys=('FFB4CCD275AAA422F5F9808E0661D98FC933A145') # Sergey Udaltsov <sergey.udaltsov@gmail.com> 

sha256sums=(0690a91bab86b18868f3eee6d41e9ec4ce6894f655443d490a2184bfac56c872  # xkeyboard-config-2.38.tar.xz
	e22a80b0cb1f66aafe85b4077831e446b1afa71fb8c0af1081118b73f037ef60) # xkeyboard-config-2.38.tar.xz.sig

# 
