# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=editline
pkgver=1.17.1
pkgrel=2
pkgdesc="readline() replacement for UNIX without termcap (ncurses)"
url="https://troglobit.com/projects/editline/"
arch="all"
license="Spencer-94"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/troglobit/editline/releases/download/$pkgver/editline-$pkgver.tar.xz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

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

sha512sums="
9b3f5f4a833e9e38c4f99d2e7f8d2716d4db74b6a2d3362e6c513505ff17a79044496405458835d508efd79cbe9046f3c1db602aaad210926312c22057145d35  editline-1.17.1.tar.xz
"
