blob: 4970a55edfcc9e7c19fd0d9b4a55d1a1ea39bab9 (
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
|
# Maintainer: Xavier de Gaye <xdegaye@gmail.com>
pkgname=python-alpm-conf
pkgver=0.3
pkgrel=1
pkgdesc='ArchLinux tool to manage /etc configuration files using git'
arch=('any')
url='https://gitlab.com/xdegaye/alpm-conf'
license=('MIT')
depends=('git' 'util-linux' 'alpm-mtree' 'python>=3.12' 'pyalpm'
'python-zstandard' 'python-flit-core')
makedepends=('python-build' 'python-installer' 'python-sphinx' 'gzip')
checkdepends=()
source=("${pkgname}::git+${url}.git#tag=${pkgver}")
sha256sums=('a849a8f0d363f3b3ed05a53d862de19462686b969989a62d5bf23b189d59aa54')
build() {
cd "${srcdir}/${pkgname}"
python -m build --wheel --no-isolation
make -C docs clean man
gzip -c docs/build/man/alpm-conf.8 > alpm-conf.8.gz
}
check() {
cd "${srcdir}/${pkgname}"
rm -rf test-env
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m unittest --verbose --catch --failfast
}
package() {
cd "${srcdir}/${pkgname}"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm 644 alpm-conf.8.gz -t "$pkgdir/usr/share/man/man8/"
}
|