summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 369790cee95a439c1552597e180c70be83335ab7 (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
# Maintainer: Neko_Rikka <yjzyl9008 at gmail dot com>

pkgname=python-bbpb-git
pkgver=r175.0eabe49
pkgrel=1
pkgdesc="A set of tools for working with encoded Protocol Buffers."
arch=('x86_64')
url="https://github.com/nccgroup/blackboxprotobuf"
license=('MIT')
provides=('python-bbpb')
conflicts=('python-bbpb')
depends=(
  'python'
  'python-six'
)
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel' 'git')
source=("git+https://github.com/nccgroup/blackboxprotobuf.git")
md5sums=('SKIP')

pkgver() {
  cd blackboxprotobuf
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd blackboxprotobuf/lib
  python -m build --wheel --no-isolation
  python -m installer --destdir="$pkgdir" dist/*.whl
  cd ..
  install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm0644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README" 
}