# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=picocom
pkgver=2024.07
_ver=${pkgver/./-}
pkgrel=0
pkgdesc="Minimal dumb-terminal emulation program"
url="https://gitlab.com/wsakernel/picocom"
arch="all"
license="GPL-2.0-or-later"
makedepends="go-md2man"
options="!check" # upstream doesn't have a test suite.
subpackages="$pkgname-doc"
source="https://gitlab.com/wsakernel/picocom/-/archive/$_ver/picocom-$_ver.tar.gz"
builddir="$srcdir/$pkgname-$_ver"

build() {
	make CFLAGS="$CFLAGS -DNO_CUSTOM_BAUD" LDFLAGS="$LDFLAGS" \
		picocom doc
}

package() {
	install -Dm755 -t "$pkgdir"/usr/bin/ ./$pkgname
	install -Dm644 -t "$pkgdir"/usr/share/man/man1/ ./$pkgname.1
	install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname/ \
		CONTRIBUTORS README.md lowerrts.md
}

sha512sums="61788f62279bc4b688a36737961d171b6e3c61de8c695f0d3bb2268f152510de587bdd182105a05ebde06fa9b32eb0d6b5bb397b69c94ea2fd60cec6fe1cafec  picocom-2024-07.tar.gz"
