# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libre2
_pkgname=re2
pkgver=2018.01.01
_pkgver=${pkgver//./-}
pkgrel=0
pkgdesc="an efficient, principled regular expression library"
url="https://github.com/google/re2"
arch="all"
license="custom"
options="!check"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/google/$_pkgname/archive/$_pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$_pkgver

build() {
	cd "$builddir"
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" prefix=/usr install
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="2ed734733710a5328779feebc1ac2ca328f4897353a3900fa214e292421b584850953c2fd3ede7cd714a5b29375c8cfe8f1e8d7f4664be4d25f2d42a2ba84002  2018-01-01.tar.gz"
