# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=drawterm
reporev=77b464a5d5648bb646467111b8faf719cd5c46b6
pkgver=0_git20240320
pkgrel=0
pkgdesc="Connect to Plan 9 CPU servers from other operating systems"
url="https://git.9front.org/plan9front/drawterm"
arch="all !armhf !armv7 !s390x !loongarch64"
license="LPL-1.02"
options="!check" # upstream does not have a test suite
makedepends="linux-headers libx11-dev libxt-dev"
subpackages="$pkgname-dbg"
giturl="git://git.9front.org/plan9front/drawterm"
disturl="dev.alpinelinux.org:/archive/drawterm"
source="https://dev.alpinelinux.org/archive/drawterm/drawterm-$pkgver.tar.gz
	respect-env.patch"

build() {
	CONF=unix make X11INC=/usr/include/X11 \
		X11LIB=/usr/lib/X11
}

package() {
	install -Dm755 $pkgname \
		"$pkgdir"/usr/bin/$pkgname
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
286641c9259476a2cd2840ac306b62eb2089a35a54298821eab61b5f2b41d2d71fac6a34f8d88d0f440895e53e5997d87e9c96e99ca72bd96e4acac37c263132  drawterm-0_git20240320.tar.gz
6d55848c890e0f829e2b616c82495d1f32fc266ffd95867c37ab115ca9570b1aada4abbaced78f4578428cb34392202206176cd3ea5873c8fb7c0ad478690c20  respect-env.patch
"
