# Contributor: Breno Leitao <breno.leitao@gmail.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=ed
pkgver=1.20.2
pkgrel=0
pkgdesc="Line-oriented text editor used to create, display, modify and otherwise manipulate text files"
url="https://www.gnu.org/software/ed/"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc"
source="https://ftp.gnu.org/gnu/ed/ed-$pkgver.tar.lz"

build() {
	# bindir needs correspond with busybox location
	./configure CC="${CC:-cc}" CFLAGS+="$CFLAGS" LDFLAGS="$LDFLAGS" \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--bindir=/bin \
		--mandir=/usr/share/man
	make all
}

check() {
	make check
}

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

sha512sums="
5efad386399035329892d8349500544f76e1b18406e164aae35af872c15a0935d412dd4a6996bd15b960d0e899857cc7d8657805f441b1b9f2ae3d73c73dcf4f  ed-1.20.2.tar.lz
"
