# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=apache-mod-md
pkgver=2.4.27
pkgrel=0
pkgdesc="Integrated Acme protocol support for apache2"
url="https://github.com/icing/mod_md"
arch="all"
license="Apache-2.0"
makedepends="apache2-dev curl-dev jansson-dev"
checkdepends="
	py3-cryptography
	py3-filelock
	py3-openssl
	"
subpackages="$pkgname-doc"
source="https://github.com/icing/mod_md/releases/download/v$pkgver/mod_md-$pkgver.tar.gz"
builddir="$srcdir/mod_md-$pkgver"
options="!check" # TODO

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5766c41971890bdd723c626c9684160eafa1352b34931f6ceb2a616e7c3ecfc044ffca5dbb98a6e58fd78618c28cd0520fc6127cf42a0bef68450b4310be1773  mod_md-2.4.27.tar.gz
"
