summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 41a83fde6791189961aa39888a64ba66c57349c1 (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
# Maintainer: gilzoide <gilzoide at gmail dot com>

pkgname=pega-texto-git
pkgver=r43.4271673
pkgrel=1
pkgdesc="A runtime engine for Parsing Expression Grammars (PEG) in C"
arch=('i686' 'x86_64')
url="https://github.com/gilzoide/pega-texto"
license=("LGPL3")
depends=()
makedepends=('git' 'cmake')
source=("$pkgname"::'git://github.com/gilzoide/pega-texto.git')
md5sums=('SKIP')

# Make pkg version as last commit date
pkgver() {
	cd "$pkgname"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

# Build with cmake
# Change `CMAKE_BUILD_TYPE` to "Debug" for debug builds
build() {
	cd "$pkgname"
	mkdir -p build
	cd build
	cmake .. -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" -DCMAKE_BUILD_TYPE=Release
	make
}

package() {
	cd "$pkgname/build"
	make install
}