# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=ax25-apps
pkgver=0.0.8_rc5
pkgrel=1
_ver=${pkgver/_rc/-rc}
pkgdesc="programs for the amateur radio (hamradio) protocol AX.25"
url="http://www.linux-ax25.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="libax25-dev ncurses-dev linux-headers"
options="!check" # no tests
subpackages="$pkgname-doc"
source="https://linux-ax25.in-berlin.de/pub/ax25-apps/ax25-apps-$_ver.tar.gz
	add-include-for-call.h.patch
	fix-ax25ipd-io.c.patch
	fix-include-ncurses.patch
	"
builddir="$srcdir/"$pkgname-$_ver

prepare() {
	default_prepare
	update_config_sub
}

build() {
	export CFLAGS="$CFLAGS -fpermissive"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--sbindir=/usr/sbin \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

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

sha512sums="
5886f79dcdd4b02374289e04a61101b1ccdcdd936a6a98bdefa7b091689381de75f722a0bf32a914c85a3759c7b42489fabf74a53492fe2f937b22c953fc230d  ax25-apps-0.0.8-rc5.tar.gz
68c9d9ba887596acc03bed1f9b40351b4983fa9c49feeed829e8b46b556fa467fe58d7433e6788e7b949f4e27832f5435174124f598e924b66d7b110de75357b  add-include-for-call.h.patch
eb1794bf7f42a3a57e697250d96917b05501c6147d62afaed157662f908b77d440bbc013ef8b8905241be37a3c1e4cb8d5c8095f268271c7c926d9d40b7038ae  fix-ax25ipd-io.c.patch
1880ee2e461e17e91fae1af104328c6d78feb66f137283fb77f5644e50512cf7c7d9a3587e29709adfaa1b7fa78571c8208558cf44c9061bf07ea8fe7a9e83e2  fix-include-ncurses.patch
"
