# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=chafa
pkgver=1.14.1
pkgrel=1
pkgdesc="Image-to-text converter supporting a wide range of symbols and palettes, transparency, animations, etc."
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://hpjansson.org/chafa/"
depends=('libavif' 'libjxl' 'librsvg' 'libwebp' 'libxslt')
makedepends=('git' 'gtk-doc')
provides=('libchafa.so')
license=("LGPL-3.0-or-later")
source=(git+https://github.com/hpjansson/chafa.git#tag=$pkgver?signed)
sha512sums=('0bbe89d08c771f6182909fc4451dd6183cb2e562272293bc7c324a7b7b016026fe787bb7ffaf6a7fe300d61a4ea4a75962f640e6dcf2f57abd541c0c5d2eb075')
validpgpkeys=('C01EDE5BB0D91E26D003662EC76BB9FEEAD12EA7')  # Hans Petter Jansson

build() {
  cd $pkgname
  ./autogen.sh --prefix=/usr --enable-man --enable-gtk-doc
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  make -C tools/completions PREFIX="$pkgdir"/usr/share install-zsh-completion
}
