# $Id: PKGBUILD 329680 2018-07-30 19:26:56Z heftig $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Nezmer <Nezmer@gmail.com>

pkgname=fribidi
pkgver=1.0.5
pkgrel=1
pkgdesc="A Free Implementation of the Unicode Bidirectional Algorithm"
arch=('x86_64')
license=('LGPL')
url="https://github.com/fribidi/fribidi/"
depends=('glibc')
makedepends=('git' 'meson')
_commit=5b6a16e8da12ae7ff482fbfa5a17b72bd518418f  # tags/v1.0.5^0
source=("git+https://github.com/fribidi/fribidi#commit=$_commit")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/-/+/g' -e 's/^v//'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D docs=false
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
