aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/lua-fun/APKBUILD32
1 files changed, 14 insertions, 18 deletions
diff --git a/testing/lua-fun/APKBUILD b/testing/lua-fun/APKBUILD
index 1db3a7a21a..3154a2777a 100644
--- a/testing/lua-fun/APKBUILD
+++ b/testing/lua-fun/APKBUILD
@@ -1,40 +1,36 @@
# Contributor: Michael Zuo <muh.muhten@gmail.com>
# Maintainer: Michael Zuo <muh.muhten@gmail.com>
pkgname=lua-fun
+_pkgname=luafun
pkgver=0.1.3
-_luaversions="5.1 5.2 5.3"
-pkgrel=0
+pkgrel=1
pkgdesc="Functional programming library"
-# "Lua Fun is a high-performance functional programming library for Lua
-# designed with LuaJIT's trace compiler in mind."
url="http://rtsisyk.github.io/luafun/"
arch="noarch"
license="MIT"
depends=""
-depends_dev=""
makedepends=""
-source="$pkgname-$pkgver.tar.gz::https://github.com/rtsisyk/luafun/archive/$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/rtsisyk/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
- subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}"
- eval "split_${_v/./_}() { _split $_v; }"
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
-_builddir="$srcdir/luafun-$pkgver"
-build() {
- :
-}
-
package() {
mkdir -p "$pkgdir"
}
-_split() {
- install_if="lua$1 $pkgname=$pkgver-r$pkgrel"
- pkgdesc="$pkgdesc for Lua $1"
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc for Lua $lver"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
- cd "$_builddir"
- install -Dm644 fun.lua "$subpkgdir/usr/share/lua/$1/fun.lua" || return 1
+ cd "$builddir"
+ install -m 644 -D fun.lua "$subpkgdir"/usr/share/lua/$lver/fun.lua
}
md5sums="ab774af3d0dea06656039e5fc3ee86ad lua-fun-0.1.3.tar.gz"