aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a661534eeae1f26edf207dc6169d8ac10b286850 (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
# Maintainer: Morbius <archlinux@seichter.de>
# vim: ts=4 sw=4 noet

pkgname="automx2"
pkgver="2024.2"
pkgrel=1
pkgdesc="Mail User Agent (email client) configuration made easy"
backup=("etc/automx2/automx2.conf")
install="install.sh"
depends=("python"
	"python-flask"
	"python-flask-migrate"
	"python-flask-sqlalchemy>=3.1.1"
	"python-ldap3"
	"python-sqlalchemy>=2.0.31")
makedepends=("python-build" "python-installer" "python-wheel")
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz"
	"automx2.conf"
	"automx2.service")
b2sums=('cc24c47edb31381c30668f0252450a2224adf46a104572526fdd3a6c0bb2748cbcf93da566fe1e347da2eb983ddb8d2e684e9a39e36ed5f6f0899e98a4f532a2'
	'e7afbacc9166556323f1c46f7bf65a906725cfce31f774f5bd47a5ab32102dacfd318c65c8524cf963918178097f8643b597c72db9514e131ee35d21e05240ce'
	'd3e760a538be4b8a87c0b00161d8e45e11331280badeae1f0a8bf26cc40f3a4b50237e9851cd73ab82b712a9bf7388c9ce8c71ddb64dc971c7d3dd0aa0612240')
arch=("any")
license=("GPL3")
url="https://github.com/rseichter/automx2"
documentation="https://rseichter.github.io/automx2/"

build() {
	pushd >/dev/null "${pkgname}-${pkgver}" || exit 1
	python -m build --wheel --no-isolation
	popd >/dev/null || exit 1
}

check() {
	pushd >/dev/null "${pkgname}-${pkgver}" || exit 1
	AUTOMX2_CONF=tests/unittest.conf python -m unittest discover -v tests/
	popd >/dev/null || exit 1
}

# shellcheck disable=SC2154
package() {
	pushd >/dev/null "${pkgname}-${pkgver}" || exit 1
	python -m installer --destdir="${pkgdir}" dist/*.whl
	install -D -m 0644 "${srcdir}/${pkgname}.conf" "${pkgdir}/etc/${pkgname}/${pkgname}.conf"
	install -D -m 0644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
	local x
	for x in README* docs/*; do
		install -D -m 0644 "${x}" "${pkgdir}/usr/share/doc/${pkgname}/$(basename "${x}")"
	done
	popd >/dev/null || exit 1
}