# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'hunspell'
setvar pkgver = '1.6.2'
setvar pkgrel = '1'
setvar pkgdesc = ""Spell checker and morphological analyzer library and program""
setvar url = ""https://hunspell.github.io/""
setvar arch = ""all""
setvar license = ""GPL2+ LGPL2+ MPL 1.1""
setvar subpackages = ""$pkgname-dev $pkgname-doc $pkgname-lang""
setvar makedepends = ""gettext-dev ncurses-dev readline-dev autoconf automake libtool""
setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/hunspell/hunspell/archive/v$pkgver.tar.gz""
setvar builddir = ""$srcdir/$pkgname-$pkgver""

proc prepare {
	cd $builddir
	default_prepare
	autoreconf -vif
}

proc build {
	cd $builddir
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-ui \
		--with-readline \
		--disable-static \
		--without-included-gettext
	make
}

proc check {
	cd $builddir
	make check
}

proc package {
	cd $builddir
	make -j1 DESTDIR="$pkgdir" install
}

setvar sha512sums = ""a23127f1271da95ac06a1fb2f57b659485e959567b61da05b2bb350684003a0fb7e882b5e524c465fd890f79f513ed03174f38611989a1c09081147c47d6da11  hunspell-1.6.2.tar.gz""