#!/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=03
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'
#}

prepare() {
  cd pycairo-$pkgver
}

build() {
  arch-meson pycairo-$pkgver build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

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

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

#---- 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

#  add889638b0bc3010273a2b1b7dfcc1e1c70efe4a4cc7b30e133da3935139f73  python-cairo-1.23.0-03-x86_64.pkg.tar.lz


