summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa51ad577318a787e4ad1035c6df16850489b9f4 (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
# Maintainer: Tony Lambiris <tony@libpcap.net>

pkgname=rexgen-git
pkgver=2.1.5.r0.gdbac1c2
pkgrel=1
pkgdesc="A tool to create words based on regular expressions"
arch=('i686' 'x86_64')
url="https://github.com/teeshop/rexgen"
license=('GPL')
depends=('git')
makedepends=('gcc' 'cmake' 'flex' 'bison' 'clang')
source=("${pkgname}::git+${url}" )
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"

	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

prepare() {
	cd "${srcdir}/${pkgname}"

    mkdir -p build
}

build() {
	cd "${srcdir}/${pkgname}/build"

    export CC=clang CXX=clang++

	cmake -Wno-dev .. \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr
	make all
}

package() {
	cd "${srcdir}/${pkgname}/build"

	make DESTDIR="${pkgdir}" install
}