mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-07 18:45:05 +02:00
71 lines
2.1 KiB
Text
71 lines
2.1 KiB
Text
# Contributor: Guy Godfroy <guy.godfroy@gugod.fr>
|
|
# Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
|
|
pkgname=dmarc-metrics-exporter
|
|
pkgver=1.2.0
|
|
pkgrel=0
|
|
pkgdesc="Prometheus metrics exporter from DMARC reports"
|
|
url="https://github.com/jgosmann/dmarc-metrics-exporter"
|
|
# s390x: because of py3-xsdata
|
|
# see https://gitlab.alpinelinux.org/alpine/aports/-/issues/15642
|
|
arch="noarch !s390x"
|
|
license="MIT"
|
|
depends="
|
|
py3-bite-parser
|
|
py3-dataclasses-serialization
|
|
py3-prometheus-client
|
|
py3-structlog
|
|
py3-uvloop
|
|
py3-xsdata
|
|
uvicorn
|
|
"
|
|
makedepends="
|
|
py3-gpep517
|
|
py3-installer
|
|
py3-poetry-core
|
|
py3-poetry-dynamic-versioning
|
|
py3-wheel
|
|
"
|
|
checkdepends="
|
|
py3-aiohttp
|
|
py3-pytest-aiohttp
|
|
py3-pytest-asyncio
|
|
py3-pytest-forked
|
|
py3-requests
|
|
"
|
|
install="$pkgname.pre-install"
|
|
subpackages="$pkgname-pyc $pkgname-openrc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/jgosmann/dmarc-metrics-exporter/archive/refs/tags/v$pkgver.tar.gz
|
|
dmarc-metrics-exporter.initd
|
|
dmarc-metrics-exporter.confd
|
|
"
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
# need a specific running imap server
|
|
pytest --forked \
|
|
--deselect=dmarc_metrics_exporter/tests/test_imap_queue.py \
|
|
--deselect=dmarc_metrics_exporter/tests/test_imap_client.py \
|
|
--deselect=dmarc_metrics_exporter/tests/test_e2e.py::test_successful_processing_of_incoming_queue_message
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
.dist/*.whl
|
|
rm -r "$pkgdir"/usr/lib/python*/site-packages/dmarc_metrics_exporter/tests/
|
|
|
|
install -m755 -D "$srcdir"/$pkgname.initd \
|
|
"$pkgdir"/etc/init.d/$pkgname
|
|
install -m644 -D "$srcdir"/$pkgname.confd \
|
|
"$pkgdir"/etc/conf.d/$pkgname
|
|
}
|
|
|
|
sha512sums="
|
|
842bbe75ca8d6df4d6ed473912f088acf166c65ae4692b8b80c0f75bc0a42b05f749a22d6c21ae6b1d757c648cc46fb7d265c852c4f6858e25d26e86bd96d5c6 dmarc-metrics-exporter-1.2.0.tar.gz
|
|
a067d586708eed0501687d0117ad7cbf8acb4624b161daa99a39e8fb116d2f6265fa7000425f21139c6033b88da5915f5adef7584b0708b5d190343c387cc1a5 dmarc-metrics-exporter.initd
|
|
b5c8ef2683b8d4a0cb6b886a8acdd5e7b8e361320cdb7256f9e29960b44cad590b1a98b65cad23de22e72c33519fcb9c971b92892683ab1692e060fb0772b0df dmarc-metrics-exporter.confd
|
|
"
|