# Contributor: tcely <tcely@users.noreply.github.com>
# Maintainer:
pkgname=botan
_pkgreal=Botan
pkgver=2.4.0
pkgrel=1
pkgdesc="Crypto and TLS for C++11"
url="https://botan.randombit.net/"
arch="x86_64 x86 ppc64le"
license="BSD-2-Clause"
depends=""
depends_dev="python2 boost-dev libressl-dev sqlite-dev bzip2-dev zlib-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://botan.randombit.net/releases/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
install=""

build() {
	cd "$builddir"
	./configure.py \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-boost \
		--with-openssl \
		--with-sqlite3 \
		--with-bzip2 \
		--with-zlib
	make
}

check() {
	cd "$builddir"

	LD_LIBRARY_PATH=. python2 src/python/botan2.py
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/python*
}

sha512sums="304663a7af280f206305b4a782bf77531547b8ab86bd4df89f03a1e11f3b70b8514ed2b8a4de545415efde83085678d7cf28e443aa9e80337a8b28274af6ae0e  Botan-2.4.0.tgz"
