# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-brotlicffi
pkgver=1.1.0.0
pkgrel=2
pkgdesc='Python bindings to the Brotli compression library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url=https://github.com/python-hyper/brotlicffi
license=(MIT)
depends=(
  brotli
  python
  python-cffi
)
makedepends=(
  git
  python-setuptools
)
_tag=353f6f16f0a1871d761fa2f68cd2efedc35afc9a
source=(git+https://github.com/python-hyper/brotlicffi.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd brotlicffi
  git describe --tags | sed 's/^v//'
}

build() {
  cd brotlicffi
  USE_SHARED_BROTLI=1 python setup.py build
}

package() {
  cd brotlicffi
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-brotlicffi
}

# vim: ts=2 sw=2 et:
