# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=libmesode
pkgver=0.10.1
pkgrel=1
pkgdesc="Fork of libstrophe for use with Profanity XMPP Client"
url="https://github.com/profanity-im/libmesode"
arch="all"
license="GPL-3.0-only MIT"
makedepends="expat-dev doxygen openssl-dev>3 automake autoconf libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/profanity-im/libmesode/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	./bootstrap.sh
}

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

doc() {
	cd "$builddir"
	mkdir -p "$subpkgdir"/usr/share/html/$pkgname
	mv docs/html/* "$subpkgdir"/usr/share/html/$pkgname/
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/*.a
}
sha512sums="00890ac903ed367872903242116527f229255bcc8988f87005b12a40a903d3b6133dff26229387c49de1ba6d911707adfc73a8a662864843899322c90e10dba7  libmesode-0.10.1.tar.gz"
