blob: 0a3244bbce6aa97a216d307a20b6ed03ab59a9fe (
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
|
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: Kazuo Teramoto <kaz.rag at gmail.com>
pkgname=afew-git
_pkgname=${pkgname%-git}
pkgver=3.0.1.r63.g65227fa
pkgrel=1
epoch=1
pkgdesc='Initial tagging script for notmuch mail'
arch=(any)
url=https://github.com/afewmail/afew
license=(ISC)
depends=(
notmuch
python-chardet
python-dkim
python-setuptools
)
makedepends=(
git
python-build
python-installer
python-setuptools-scm
python-sphinx
python-wheel
)
checkdepends=(python-freezegun)
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+$url.git")
b2sums=(SKIP)
pkgver() {
cd afew
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$_pkgname"
python -m build --wheel --skip-dependency-check --no-isolation
PYTHONPATH="build:$PYTHONPATH" sphinx-build -b man docs build
}
check() {
cd "$_pkgname"
python -m unittest discover "$_pkgname"/tests
}
package() {
cd "$_pkgname"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 -t "$pkgdir"/usr/share/man/man1 build/"$_pkgname".1
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir"/usr/share/licenses/$pkgname
ln -s "$site_packages"/"$_pkgname"-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|