summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6351a9ee3702c0c70105d0ae9ef82a2bb41fd915 (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
# Maintainer: Bruno Santos <brunomanuelsantos@tecnico.ulisboa.pt>

upstream_name=hawkmoth
aur_name=python-sphinx-hawkmoth
pkgname=$aur_name-git
pkgver=0.8.0.69r.g4bebfe2
pkgrel=1
pkgdesc='Sphinx autodoc C extension'
arch=('i686' 'x86_64')
url='https://github.com/jnikula/hawkmoth'
license=('BSD2')
depends=('python-sphinx' 'clang')
provides=($aur_name)
conflicts=($aur_name)
source=('git+https://github.com/jnikula/hawkmoth')
# source=('git+https://gitlab.com/bms-contrib/hawkmoth#branch=anonym')
md5sums=('SKIP')

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

build() {
	cd $srcdir/$upstream_name
	python -m build --wheel --no-isolation
}

package() {
	cd $srcdir/$upstream_name
	python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
	install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}