# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dialog
pkgver=1.3.20240619
_pkgver=${pkgver%.*}-${pkgver##*.}
pkgrel=0
pkgdesc="Script interpreter providing curses widgets"
url="https://invisible-island.net/dialog/dialog.html"
arch="all"
license="LGPL-2.1-only"
makedepends="ncurses-dev"
subpackages="$pkgname-doc $pkgname-static"
source="https://invisible-mirror.net/archives/dialog/dialog-$_pkgver.tgz"
builddir="$srcdir/$pkgname-$_pkgver"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-ncursesw
	make
}

check() {
	make check
}

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

sha512sums="
0c8884b9effbd745e245aa36daa262381a349559476dfe2244e948a5374f927b377dbed233b73771caa57f8dd0a9cc712ec2669e43268bb578b9e4e721dd054a  dialog-1.3-20240619.tgz
"
