summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1cd0e546e635e60aad2bbd0d7e266f83651faf50 (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
39
40
41
42
43
44
45
46
47
48
49
# Contributor: Doron Behar <doron.behar@gmail.com>
# Maintainer: groctel <aur@taxorubio.org>
# shellcheck disable=SC2034,SC2154,SC2164

pkgname=compiledb
pkgver=0.10.1
pkgrel=3
pkgdesc="Tool for generating Clang's JSON Compilation Database file for GNU make-based build systems"

replaces=(compiledb-generator)

arch=("any")
url="https://github.com/nickdiego/compiledb-generator"
license=("GPL3")

source=("$pkgname-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('3f288e4897e2b17b4dd8070d3ad9e9fc627961faa4d0be29a78f6c619e055f36')

depends=(
    "python"
    "python-click"
    "python-bashlex"
    "python-shutilwhich"
)
makedepends=(
    "python-build"
    "python-installer"
    "python-setuptools"
    "python-wheel"
)
checkdepends=(
    "python-pytest"
)

build () {
    cd "$srcdir/$pkgname-$pkgver"
    python -m build --wheel --no-isolation
}

check () {
    cd "$srcdir/$pkgname-$pkgver"
    pytest
}

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