# $Id: PKGBUILD 330812 2018-08-06 08:28:31Z foutrelis $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Adam Hani Schakaki <krzd@krzd.net>

pkgname=caribou
pkgver=0.4.21+60+gec9041b
pkgrel=2
pkgdesc="A text entry and UI navigation application (on-screen keyboard)"
arch=('x86_64')
url="http://live.gnome.org/Caribou"
license=(LGPL)
depends=(at-spi2-atk python-atspi python-gobject gtk3 libxklavier libgee clutter dconf)
makedepends=(intltool docbook-xsl gtk2 gobject-introspection vala git gnome-common)
options=(!emptydirs)
_commit=ec9041baf3a42fee24e34318e04ae4f5349bd7ec  # master
source=("git+https://git.gnome.org/browse/caribou#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --long | sed -e 's/-/+/g' -e 's/^CARIBOU_//' -e 's/_/./g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname

  ./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/lib/$pkgname \
    --disable-static \
    --disable-schemas-compile

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

check() {
  cd $pkgname
  make -k check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
