aboutsummaryrefslogtreecommitdiffstats
path: root/community/libre2/APKBUILD
blob: 4f9e9c0aae74119114c7c10f8507f4515fae9ff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libre2
_pkgname=re2
pkgver=2017.04.01
_pkgver=${pkgver//./-}
pkgrel=0
pkgdesc="an efficient, principled regular expression library"
url="https://code.google.com/p/re2/"
arch="all"
license="custom"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/google/$_pkgname/archive/$_pkgver.tar.gz"

_builddir="$srcdir"/$_pkgname-$_pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make || return 1
}

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

sha512sums="59aa92582b2bbd44311ea92aa6bbeb5d3e8d9b115b7fb83f911b6e5680a650c2b22759d935298e1b1b3f5c44014bcc2defb22b136473ad9ed7c4ea006834a700  2017-04-01.tar.gz"