# Contributor: Michael Truog <mjtruog@gmail.com>
# Maintainer: Michael Truog <mjtruog@gmail.com>

pkgname=tsung
pkgver=1.7.0
pkgrel=0
pkgdesc="Tsung is a high-performance benchmark framework for various protocols including HTTP,XMPP,LDAP,etc."
url="http://www.process-one.net/en/tsung/"
license="GPL-2.0"
arch="noarch !armhf !s390x"
depends="bash
         erlang
         erlang-crypto
         erlang-inets
         erlang-os-mon
         erlang-sasl
         erlang-xmerl
         gnuplot
         perl-template-toolkit
         python2
         py-matplotlib
         "
makedepends="erlang
             erlang-asn1
             erlang-crypto
             erlang-dev
             erlang-eunit
             erlang-inets
             erlang-os-mon
             erlang-snmp
             erlang-ssl
             erlang-tools
             erlang-xmerl
             perl
             "
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/processone/$pkgname/archive/v$pkgver.tar.gz
        0005-Do-not-install-manpages-in-main-install.patch"

builddir="$srcdir/tsung-$pkgver"

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--host="$CHOST" \
		--build="$CBUILD"
	make
}

check() {
	cd "$builddir"
	make test
}

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

sha512sums="63ec9b7b2f0a9fafde8182160b55513526009be056c6715ecff8dbeb40ab05f55d264f8f79e22b8987c6019c0b7eed9ac4e0e71792ad4cad67c758e64257c1d5  tsung-1.7.0.tar.gz
ee80c21fe6a66c96b1aa68afd96209516a5a3fe1d51a1ee01a1f465d164c332bbe30f03de1cc20f3d6e0651770fa7e579d64f52d282b64d6ca02d098852f2a93  0005-Do-not-install-manpages-in-main-install.patch"
