# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=re2
pkgver=20171201
_pkgver=${pkgver:0:4}-${pkgver:4:2}-${pkgver:6:2}
pkgrel=0
pkgdesc="A fast, safe, thread-friendly alternative to backtracking RE engines"
url="https://github.com/google/re2"
arch="all"
license="BSD"
subpackages="$pkgname-dev"
source="$pkgname-$_pkgver.tar.gz::https://github.com/google/$pkgname/archive/$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"

build() {
	cd "$builddir"
	make prefix=/usr
}

check() {
	cd "$builddir"
	make shared-test static-test
}

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

sha512sums="1943be4543ac6cedaef27202e126bddc57472926c2f28470c5e980902252d58e18bb4578c538883d9368a041e4928983fa27cd960c3671fe3b6366dbd5048b29  re2-2017-12-01.tar.gz"
