aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-lpeg
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-09-02 23:22:42 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-02 23:25:19 +0200
commitc01b74be5d52f436b9b1666d8e318905e53575ff (patch)
treef8f285a5ff7956c74a34fe7b7269d072b2981a88 /community/lua-lpeg
parent7d1fcc6e157b047139d5cb62055b1c53e62af2b3 (diff)
downloadaports-c01b74be5d52f436b9b1666d8e318905e53575ff.tar.bz2
aports-c01b74be5d52f436b9b1666d8e318905e53575ff.tar.xz
community/lua-lpeg: move from testing
Diffstat (limited to 'community/lua-lpeg')
-rw-r--r--community/lua-lpeg/APKBUILD65
1 files changed, 65 insertions, 0 deletions
diff --git a/community/lua-lpeg/APKBUILD b/community/lua-lpeg/APKBUILD
new file mode 100644
index 0000000000..a777a01025
--- /dev/null
+++ b/community/lua-lpeg/APKBUILD
@@ -0,0 +1,65 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-lpeg
+_pkgname=lpeg
+pkgver=1.0.0
+pkgrel=0
+pkgdesc="Pattern-matching library for Lua"
+url="http://www.inf.puc-rio.br/~roberto/lpeg"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends=""
+subpackages=""
+source="http://www.inf.puc-rio.br/~roberto/lpeg/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-$_pkgname:_package"
+done
+
+prepare() {
+ default_prepare || return 1
+
+ cd "$builddir"
+
+ sed -i -e 's/^CFLAGS =/CFLAGS +=/' \
+ -e 's/^COPT =/# COPT =/' \
+ makefile || return 1
+
+ local lver; for lver in $_luaversions; do
+ cp -r "$builddir" "$builddir-$lver" || return 1
+ done
+}
+
+build() {
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver..."
+ make -C "$builddir-$lver" LUADIR=/usr/include/lua$lver || return 1
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_package() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="Pattern-matching library for Lua $lver"
+ arch="all"
+ depends="lua$lver"
+ install_if="lua$lver $pkgname=$pkgver-r$pkgrel"
+
+ cd "$builddir-$lver"
+
+ install -Dm755 lpeg.so \
+ "$subpkgdir"/usr/lib/lua/$lver/lpeg.so || return 1
+ install -Dm644 re.lua \
+ "$subpkgdir"/usr/share/lua/$lver/re.lua || return 1
+}
+
+md5sums="0aec64ccd13996202ad0c099e2877ece lpeg-1.0.0.tar.gz"
+sha256sums="10190ae758a22a16415429a9eb70344cf29cbda738a6962a9f94a732340abf8e lpeg-1.0.0.tar.gz"
+sha512sums="a245d2e0b8604121d8b4466052ab5da4f2b1f81c1c4b2579d8d5498920fc351d46fe4159a0b5948d1b377ef9bda410c4bf40ffd228b9f26bf346dfba2a7b9fb7 lpeg-1.0.0.tar.gz"