#!/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=python-cairo
pkgver=1.23.0
pkgrel=02
pkgdesc="Python bindings for the cairo graphics library"
arch=('x86_64')
url="https://pycairo.readthedocs.io/en/latest/"
depends=(cairo python)
#makedepends=(git python-setuptools)
makedepends=(meson)
checkdepends=(python-pytest)
source=(https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz{,.sig})
#source=("git+https://github.com/pygobject/pycairo/#commit=$_commit")

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

build() {
  meson build pycairo-$pkgver \
    --prefix=/usr
  meson compile -C build

  # compile Python bytecode
  python -m compileall -d / "$pkgdir"/usr/lib
  python -O -m compileall -d / "$pkgdir"/usr/lib

}

check() {
  cd build
  pytest -v
}

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

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

license=('LGPL2.1' 'MPL')

validpgpkeys=(0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC) # 46BD761F7A49B0EC: "Christoph Reiter <reiter.christoph@gmail.com>

sha256sums=(9b61ac818723adc04367301317eb2e814a83522f07bbd1f409af0dada463c44c  # pycairo-1.23.0.tar.gz
	330b78edd63f25e589e8af67e97b79cbd19e02d82297a2c706234a31288a986c) # pycairo-1.23.0.tar.gz.sig


