blob: 60c3b1bb1dc598f86edac7c88854ac71736ac49d (
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
|
# Maintainer: Adrien Smith <adrien@panissupraomnia.dev>
# Contributor: Caleb Maclennan <caleb@alerque.com>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: sudokode <sudokode@gmail.com>
# Contributor: Jason Chu <jason@archlinux.org>
# Contributor: Jesse Young <jesse.young@gmail.com>
pkgname=namcap-git
pkgver=3.4.2.r14.g58592b0
pkgrel=1
pkgdesc="A Pacman package analyzer"
arch=('any')
url="https://gitlab.archlinux.org/pacman/${pkgname%-git}"
license=('GPL-2.0-or-later')
depends=(binutils
elfutils
licenses
pkgconf
pyalpm
python
python-license-expression
python-pyelftools)
makedepends=(git
python-{build,installer,wheel}
python-setuptools)
checkdepends=(python-pytest
python-six
systemd)
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=("git+$url.git")
sha256sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${pkgname%-git}"
python -m build -wn
}
check() {
cd "${pkgname%-git}"
env PARSE_PKGBUILD_PATH="$PWD" PATH="$PWD/scripts:$PATH" pytest
}
package() {
cd "${pkgname%-git}"
python -m installer -d "$pkgdir" dist/*.whl
local site_packages
site_packages="$(python -c "import site; print(site.getsitepackages()[0])")"
mv "$pkgdir/"{"$site_packages/usr/share",usr}
rmdir "$pkgdir/$site_packages/usr"
}
|