# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=stfl
pkgver=0.24
pkgrel=2
pkgdesc="The Structured Terminal Forms Language/Library"
url="http://www.clifford.at/stfl/"
arch="all"
license="LGPL-3.0-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev ncurses-dev"
install=""
subpackages="$pkgname-dev"
source="http://www.clifford.at/stfl/stfl-$pkgver.tar.gz
	ncurses.patch"

_builddir="$srcdir"/stfl-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make prefix=/usr || return 1
}

package() {
	cd "$_builddir"
	make prefix=/usr DESTDIR="$pkgdir" install || return 1
	cd "$pkgdir"/usr/lib
	ln -s libstfl.so.0.24 libstfl.so.0
}

md5sums="98c764ccc8f13ed05ea22559d7116b96  stfl-0.24.tar.gz
63198ddede520b856065c7f813effdf6  ncurses.patch"
sha256sums="d4a7aa181a475aaf8a8914a8ccb2a7ff28919d4c8c0f8a061e17a0c36869c090  stfl-0.24.tar.gz
851ddaa7835b9adc47528522f8a99fb504affd8b95e542c309b7cc8907d3ea4b  ncurses.patch"
sha512sums="95df4574b1bc32d795751156dc5b93afbca3ba241607a3a55210c89dda61b9a26ad574bb5f729a0158c9052235dbf63d6c58b38e7f1061d14ab7062af6150fa0  stfl-0.24.tar.gz
d445b7bebd53ab23765f8386d8e69080df1cf95ca7368dee98594176e5a99f73d741a14e81af1500dc249c2a485574a5323d16fffa12536f7f3f20049b636de6  ncurses.patch"
