summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 31ac8c471f2aab4faf693709343fcebffd06cba5 (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
# Maintainer: robertfoster
pkgname="python-dtschema-git"
pkgver=2024.02.r14.64b72b0
pkgrel=1
pkgdesc="Tools and schema data for Devicetree schema validation using the json-schema vocabulary"
arch=(any)
url="https://github.com/devicetree-org/dt-schema"
license=("BSD-2-Clause")
depends=(
  'dtc'
  'python-jsonschema'
  'python-rfc3987'
  'python-ruamel-yaml'
  'python-tqdm'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-setuptools-scm'
  'python-wheel'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")

source=(
  "${pkgname%-git}::git+${url}"
)

pkgver() {
  cd "${srcdir}/${pkgname%-git}"

  printf "%s" "$(git describe --long | sed 's/^v//g' | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

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

package() {
  cd "${srcdir}/${pkgname%-git}"
  python -m installer --destdir="$pkgdir" dist/*.whl
}

sha256sums=('SKIP')