# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=oniguruma
pkgver=6.7.0
pkgrel=0
pkgdesc="a regular expressions library"
url="http://www.geocities.jp/kosako3/oniguruma/"
arch="all"
license="BSD"
makedepends="automake autoconf libtool"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/kkos/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

check() {
	cd "$builddir"
	make check
}

prepare() {
	cd "$builddir"
	autoreconf -vfi
}

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

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

sha512sums="f10088b9b6d9084f725edbfaca658de3b8807bda5e8670d28ee5762d829b0e58dea8c0dfcb98fe7d33ad87415514420996f9d60bc7ea5e3757f9fb2cee345a62  oniguruma-6.7.0.tar.gz"
