File PKGBUILD of Package re2

# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Alexandre Bique <bique.alexandre@gmail.com>

pkgname=re2
_re2ver=2019-07-01
pkgver=${_re2ver//-}
pkgrel=1
pkgdesc="Fast, safe, thread-friendly regular expression engine"
arch=('x86_64')
license=('BSD')
depends=('gcc-libs')
source=(re2-$pkgver.tar.gz)
sha256sums=('de6c3ee49b2cecdfd2936af18d6947db36726590e566b5915db3746784c55745')

build() {
  cd $pkgname-$_re2ver
  make
}

check() {
  cd $pkgname-$_re2ver
  make test
}

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