summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2aadcb6e68ed094b7a650fb153680ec362052c0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Aseem Athale <athaleaseem@gmail.com>

_pkgname=gbinder-python
pkgname=python-gbinder-git
pkgver=1.1.2.r0.ga2c5093
pkgrel=3
pkgdesc="Python bindings for libgbinder - git version"
arch=('any')
url="https://github.com/erfanoabdi/gbinder-python"
license=('GPL')
depends=('libgbinder')
conflicts=('python-gbinder')
replaces=('python-gbinder')
makedepends=('python-build' 'cython' 'python-installer' 'python-wheel' 'python-setuptools' 'python-wheel' 'git')
source=(git+${url}.git)
sha512sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "${_pkgname}"
  cython -a gbinder.pyx
  git -C "${srcdir}/${_pkgname}" clean -dfx
}

build() {
  cd ${_pkgname}
  python -m build --wheel --no-isolation
}

package() {
  cd ${_pkgname}
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}