summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ba015b4ffcbeb081a4690360b5e70bfd22792b19 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: Emil Velikov <emil.l.velikov@gmail.com>

pkgname=keyringctl-git
pkgver=r170.da6c4af
pkgrel=1
pkgdesc="Tool to build, manage and inspect Web-of-Trust keyrings"
url="https://gitlab.archlinux.org/archlinux/keyringctl.git"
license=('GPL3')
arch=('any')
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-wheel'
  'python-pdm'
  'python-pdm-pep517'
)

checkdepends=(
  # For make lint
  'python-black'
  'flake8'
  'python-isort'
  'mypy'
  # For make test
  'python-coverage'
  'python-pytest'
  'python-tomli'
)

depends=('python' 'sequoia-sq')
optdepends=(
  'hopenpgp-tools: for verify command'
  'sequoia-keyring-linter: for verify command'
  'git: for ci command'
)
# The original code in the upstream repo is badly borken. Use my fork for now.
#source=("${pkgname%-git}::git+$url")
source=("${pkgname%-git}::git+https://gitlab.archlinux.org/xexaxo/keyringctl.git#branch=en-route-to-archpkg")
sha512sums=('SKIP')

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

build() {
  cd "${pkgbase%-git}"

  make build
}

check() {
  cd "${pkgbase%-git}"

  make lint
  make test
}

package() {
  cd "${pkgbase%-git}"

  DESTDIR="$pkgdir" make install
}