# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=retawq
pkgver=0.2.6c
pkgrel=8
pkgdesc="retawq is an interactive, multi-threaded network client for text terminals"
url="https://retawq.sourceforge.net/"
arch="all"
license="GPL-2.0"
makedepends="ncurses-dev openssl-dev>3"
subpackages="$pkgname-doc"
source="https://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	libressl.patch
	ncurses-opaque.patch
	"

build() {
	./configure \
		--path-archprefix="$pkgdir"/usr \
		--path-prefix="$pkgdir"/usr \
		--path-man="$pkgdir"/usr/share/man \
		--path-doc="$pkgdir"/usr/share/doc/$pkgname \
		--enable-cookies \
		--enable-local-cgi \
		--set-tls=2 \
		--enable-ipv6
	make
}

package() {
	mkdir -p "$pkgdir"/usr/share/man
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	make DESTDIR="$pkgdir" install
}

sha512sums="
555f61460decf3108e85f0d0153d281a7b9a9fd2474563fcf47145bf969025ffcfad6d5dc0ae946bde11bdf880cc26ceb5cde3194194a1cbbaadc4a672a094f8  retawq-0.2.6c.tar.gz
3f54adee86945c2b5a2acc300cfc580186759a7545868578780e6bf60f17b29e39c1a4f55745e48dbfdfa05010bddf0ec98cdb510aa5dd19d437c5f45e97a632  libressl.patch
c307193cc8f2c8ecee5462ad0c5bfbdfb4f0c5e560c0dd92ed867e4080af21b9a9af7dfd682fb1da9dd95a49a0140304aa5d5d8d2939eb2d66a784dd66151075  ncurses-opaque.patch
"
