# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=loudmouth
pkgver=1.5.4
pkgrel=3
pkgdesc="A lightweight Jabber client library"
url="http://groups.google.com/group/loudmouth-dev"
arch="all"
license="LGPL-2.0-or-later"
depends_dev="pkgconfig gnutls-dev libidn-dev libasyncns-dev check-dev autoconf"
makedepends="$depends_dev glib-dev"
subpackages="$pkgname-dev"
source="https://mcabber.com/files/loudmouth/loudmouth-$pkgver.tar.bz2
	fix-freeaddrinfo.patch
	"

prepare() {
	default_prepare
	update_config_sub

	autoconf
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--disable-static \
		--with-asyncns=yes \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-compile-warnings=no
	make
}

check() {
	make check
}

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

sha512sums="
49a08f0130b9ee56f07586d244504c81242723865a136b03e1049f32b1aa1e6c49e9b76b38f0cfb812ef4c66f73b7d83914a58e9a93e0496207e06c2b5efa9d8  loudmouth-1.5.4.tar.bz2
935c2534c9b895df58da20919e7d50f56bedc83289141d82d1d31dba506eafd16282e9a18b30848701cbd94340f5c0e0f37af229657a2b3d5ea38d582352cbaa  fix-freeaddrinfo.patch
"
