diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-10 14:05:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-10 14:39:28 +0000 |
commit | 91bd0ba5a871cf4be01075f63d5a2b356996e805 (patch) | |
tree | b08e51c59d0c227dd8d8b3077b4035bd8e356305 /main/lua-microlight/APKBUILD | |
parent | a0f84571d8ccee800bc652bb8095c3a7ab194203 (diff) | |
download | aports-91bd0ba5a871cf4be01075f63d5a2b356996e805.tar.bz2 aports-91bd0ba5a871cf4be01075f63d5a2b356996e805.tar.xz |
main/lua-microlight: install for lua lua 5.1 and 5.2
Diffstat (limited to 'main/lua-microlight/APKBUILD')
-rw-r--r-- | main/lua-microlight/APKBUILD | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/main/lua-microlight/APKBUILD b/main/lua-microlight/APKBUILD index 9a6df6d320..4ff23f391c 100644 --- a/main/lua-microlight/APKBUILD +++ b/main/lua-microlight/APKBUILD @@ -1,5 +1,6 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> +_luaversions="5.1 5.2" pkgname=lua-microlight pkgver=1.1.1 pkgrel=0 @@ -7,10 +8,14 @@ pkgdesc="a really compact set of general Lua functions" url="http://stevedonovan.github.com/microlight/" arch="noarch" license="MIT" -depends="lua" -makedepends="" +depends="lua5.1-microlight" install="" +makedepends="" subpackages="" +for _i in $_luaversions; do + makedepends="$makedepends lua$_i-dev" + subpackages="$subpackages lua$_i-microlight:split_${_i/./_}" +done source="lua-microlight-$pkgver.tar.gz::https://github.com/stevedonovan/Microlight/archive/$pkgver.tar.gz" _builddir="$srcdir"/Microlight-$pkgver @@ -31,9 +36,29 @@ build() { package() { cd "$_builddir" - install -Dm644 "$_builddir"/ml.lua "$pkgdir"/usr/share/lua/5.1/ml.lua + for _i in $_luaversions; do + install -Dm644 "$_builddir"/ml.lua \ + "$pkgdir"/usr/share/lua/$_i/ml.lua || return 1 + done } +_split() { + local d= _ver=$1 + pkgdesc="a really compact set of general functions for Lua $_ver" + replaces="$pkgname" + depends= + for d in usr/lib/lua usr/share/lua; do + if [ -d "$pkgdir"/$d/$_ver ]; then + mkdir -p "$subpkgdir"/$d + mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1 + fi + done +} + +for _i in $_luaversions; do + eval "split_${_i/./_}() { _split $_i; }" +done + md5sums="cb6eacf4a8a0856548d4d6849fdb96f5 lua-microlight-1.1.1.tar.gz" sha256sums="c713689c9d477971b494307308c4ea4a877b2994078b7603ba5767c8a4843113 lua-microlight-1.1.1.tar.gz" sha512sums="debffab0c599754cb70852e82b2cb76af16dcefa7c1c4c54be1a0949d3f24312a72c9e9accd512a2f7d230259b7b7d18bc5919dbaff5458953236f9752582a45 lua-microlight-1.1.1.tar.gz" |