summaryrefslogtreecommitdiffstats
path: root/main/lua-rex/APKBUILD
blob: 1a8a5aca36286c5be241b438c519d2873c918d93 (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
43
44
45
46
47
48
49
50
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua-rex
pkgver=2.5.3
pkgrel=1
pkgdesc="Lua bindings to regular expression library pcre and posix"
url="http://lrexlib.luaforge.net/"
arch="all"
license="MIT"
depends="lua-rex-pcre lua-rex-posix"
makedepends="pcre-dev lua-dev"
install=
subpackages="$pkgname-pcre $pkgname-posix"
source="http://luaforge.net/frs/download.php/4759/lrexlib-2.5.3.zip"

_builddir="$srcdir"/lrexlib-$pkgver

prepare() {
	cd "$_builddir"
	sed -i -e "s/^MYCFLAGS.*/MYCFLAGS = $CFLAGS -fPIC/" src/defaults.mak
	sed -i -e "s/^LD .*/LD = gcc/" \
		src/common.mak
}

build() {
	cd "$_builddir"
	make -j1 -C src/pcre
	make -j1 -C src/posix
}

package() {
	mkdir -p "$pkgdir"
}

pcre() {
	pkgdesc="Lua bindings to pcre regular expressions library"
	depends=
	cd "$_builddir"
	install -d "$subpkgdir"/usr/lib/lua/5.1
	cp -a src/pcre/rex_pcre.so* "$subpkgdir"/usr/lib/lua/5.1
}

posix() {
	pkgdesc="Lua bindings to posix regular expressions library"
	depends=
	cd "$_builddir"
	install -d "$subpkgdir"/usr/lib/lua/5.1
	cp -a src/posix/rex_posix.so* "$subpkgdir"/usr/lib/lua/5.1
}

md5sums="a51c5ff54d85bfd1222ddbfd922a7d51  lrexlib-2.5.3.zip"