# Contributor: Andrey Pustovetov <andrey.pustovetov@gmail.com>
# Maintainer: Andrey Pustovetov <andrey.pustovetov@gmail.com>
pkgname=kcat
pkgver=1.7.1
pkgrel=2
pkgdesc="Generic command-line non-JVM Apache Kafka producer and consumer"
url="https://github.com/edenhill/kcat"
# 32-bit: libserdes
arch="all !x86 !armhf !armv7"
makedepends="
	bash
	librdkafka-dev
	libserdes-dev
	yajl-dev
	"
license="BSD-2-Clause"
options="!check" # upstream doesn't have a test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/edenhill/kcat/archive/$pkgver.tar.gz"

# Backwards compatibility
replaces="kafkacat"
provides="kafkacat=$pkgver-r$pkgrel"

build() {
	bash ./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-avro \
		--enable-json
	make
}

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

sha512sums="
07aa442a840819ca8d1ab20d86fe9d07afee0e4fa546b033ceb0c1c526f3fb5d9fbd2c34c29460d3439c5046b836605150dc76e85072d9516d82b9a193a0a3cd  kcat-1.7.1.tar.gz
"
