aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/lua-rex/APKBUILD31
1 files changed, 19 insertions, 12 deletions
diff --git a/main/lua-rex/APKBUILD b/main/lua-rex/APKBUILD
index 81015c922d..51a719f05e 100644
--- a/main/lua-rex/APKBUILD
+++ b/main/lua-rex/APKBUILD
@@ -1,15 +1,16 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2 5.3"
pkgname=lua-rex
-pkgver=2.9.0
+pkgver=2.9.1
pkgrel=0
pkgdesc="Lua bindings to regular expression library pcre and posix"
+options="!check" # TODO: get testsuite
url="http://lrexlib.luaforge.net/"
arch="all"
license="MIT"
depends="lua-rex-pcre lua-rex-posix"
makedepends="pcre-dev"
-install=
subpackages="$pkgname-pcre:_pcre $pkgname-posix:_posix"
for _i in $_luaversions; do
@@ -23,12 +24,14 @@ done
source="$pkgname-$pkgver.tar.gz::https://github.com/rrthomas/lrexlib/archive/rel-${pkgver//./-}.tar.gz"
-_builddir="$srcdir"/lrexlib-rel-${pkgver//./-}
+builddir="$srcdir"/lrexlib-rel-${pkgver//./-}
prepare() {
+ default_prepare
+
local _ver
for _ver in $_luaversions; do
- cp -r "$_builddir" "$srcdir"/build-$_ver
+ cp -r "$builddir" "$srcdir"/build-$_ver
done
}
@@ -38,15 +41,15 @@ _build_variant() {
local _flags="$3"
${CC:-gcc} \
- ${CFLAGS} \
+ $CFLAGS \
$(pkg-config --cflags lua$_ver) \
-shared \
-fPIC \
-o $_obj.${pkgver%.*} \
$_flags \
-DVERSION=\"$pkgver\" \
- -DLUA_COMPAT_5_2 || return 1
- ln -s $_obj.${pkgver%.*} $_obj || return 1
+ -DLUA_COMPAT_5_2
+ ln -s $_obj.${pkgver%.*} $_obj
}
build() {
@@ -56,9 +59,11 @@ build() {
cd "$srcdir"/build-$_ver
_build_variant $_ver rex_pcre.so \
'src/common.c src/pcre/lpcre.c src/pcre/lpcre_f.c
- -lpcre' || return 1
+ -lpcre'
+
_build_variant $_ver rex_posix.so \
- 'src/common.c src/posix/lposix.c' || return 1
+ 'src/common.c src/posix/lposix.c'
+
done
}
@@ -84,9 +89,11 @@ _split() {
pkgdesc="Lua $_ver bindings to $_lib regular expressions library"
install_if="lua$_ver lua-rex-$_lib=$pkgver-r$pkgrel"
depends=
- install -d "$subpkgdir"/usr/lib/lua/$_ver || return 1
+ install -d "$subpkgdir"/usr/lib/lua/$_ver
+
cp -a "$srcdir"/build-$_ver/rex_$_lib.so* \
- "$subpkgdir"/usr/lib/lua/$_ver || return 1
+ "$subpkgdir"/usr/lib/lua/$_ver
+
}
-sha512sums="f37e6170595f1ce90f0ccdddbb0fc3c3d93378bdd48467d38705a3a4aec2eff640756fe96105cbccbdb9448bdf7476a88ac46cbf5214877dfe289ef19176f568 lua-rex-2.9.0.tar.gz"
+sha512sums="05f9305b76791521f0fcc0010c96dc883542acf97597ad15d448fdaf3d2deb7dd09919c052b974c6de3cb7e3cf4980b73b51d4482c6e25dfaf055a62e46205b9 lua-rex-2.9.1.tar.gz"