# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=apache-mod-md
pkgver=2.4.28
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="
74ef7cae20237d8791f5402fa74711e4b157dcc63398f8c85904fd62fb14a17c736ccd778e10b5b608447a1d2c51095e7a4fd408f6c321a7f758e24b4f0f0356  mod_md-2.4.28.tar.gz
"
