diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-27 13:48:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-27 13:58:30 +0000 |
commit | 0ed4811af5d91488e898c4cc746a2086f63d8673 (patch) | |
tree | 3cbc09ea5435be9ba11758b58a43bc4e8c9eb37a | |
parent | c7f11d55d7c031362972a17af85928f7f182f3fb (diff) | |
download | aports-0ed4811af5d91488e898c4cc746a2086f63d8673.tar.bz2 aports-0ed4811af5d91488e898c4cc746a2086f63d8673.tar.xz |
main/lua-penlight: upgrade to 1.3.2
-rw-r--r-- | main/lua-penlight/APKBUILD | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/main/lua-penlight/APKBUILD b/main/lua-penlight/APKBUILD index 74b14acd1..63699b9d2 100644 --- a/main/lua-penlight/APKBUILD +++ b/main/lua-penlight/APKBUILD @@ -1,17 +1,21 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> +_luaversions="5.1 5.2 5.3" pkgname=lua-penlight -pkgver=1.3.1 -pkgrel=3 +pkgver=1.3.2 +pkgrel=0 pkgdesc="Lua libraries for extended operations on tables, lists and strings" url="http://stevedonovan.github.io/Penlight" arch="noarch" license="MIT" -depends="lua5.1-penlight lua5.2-penlight" +depends="" makedepends="" install= -subpackages="$pkgname-doc $pkgname-shared - lua5.1-penlight:_51 - lua5.2-penlight:_52" +subpackages="$pkgname-doc $pkgname-shared" +for _v in $_luaversions; do + makedepends="$makedepends lua$_v-dev lua$_v-filesystem" + subpackages="$subpackages lua$_v-penlight:split_${_v/./_}" +done + source="penlight-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz" _builddir="$srcdir"/Penlight-$pkgver @@ -25,13 +29,13 @@ build() { package() { cd "$_builddir" mkdir -p "$pkgdir"/usr/share/lua/common/ \ - "$pkgdir"/usr/share/lua/5.1/ \ - "$pkgdir"/usr/share/lua/5.2/ \ "$pkgdir"/usr/share/doc/$pkgname cp -r lua/pl "$pkgdir"/usr/share/lua/common/ || return 1 cp -r examples "$pkgdir"/usr/share/doc/$pkgname/ - ln -s ../common/pl "$pkgdir"/usr/share/lua/5.1/pl - ln -s ../common/pl "$pkgdir"/usr/share/lua/5.2/pl + for i in $_luaversions; do + mkdir -p "$pkgdir"/usr/share/lua/$i || return 1 + ln -s ../common/pl "$pkgdir"/usr/share/lua/$i/pl || return 1 + done } shared() { @@ -41,21 +45,19 @@ shared() { mv "$pkgdir"/usr/share/lua/common "$subpkgdir"/usr/share/lua/ } -_52() { - pkgdesc="Lua 5.2 libraries for extended operations on tables, lists and strings" - depends="lua-penlight-shared lua5.2-filesystem" +_split() { + local _ver="$1" + pkgdesc="Lua $_ver libraries for extended operations on tables, lists and strings" + depends="lua-penlight-shared lua$_ver-filesystem" + install_if="lua$_ver $pkgname=$pkgver-r$pkgrel" mkdir -p "$subpkgdir"/usr/share/lua/ - mv "$pkgdir"/usr/share/lua/5.2 "$subpkgdir"/usr/share/lua/ + mv "$pkgdir"/usr/share/lua/$_ver "$subpkgdir"/usr/share/lua/ } -_51() { - pkgdesc="Lua 5.1 libraries for extended operations on tables, lists and strings" - replaces="lua-penlight" - depends="lua-penlight-shared lua5.1-filesystem" - mkdir -p "$subpkgdir"/usr/share/lua/ - mv "$pkgdir"/usr/share/lua/5.1 "$subpkgdir"/usr/share/lua/ -} +for _v in $_luaversions; do + eval "split_${_v/./_}() { _split $_v; }" +done -md5sums="831f8ce7d3d5c872d129ad5db54a8424 penlight-1.3.1.tar.gz" -sha256sums="0f96ef033d9623ffd561a77088ac5adfd87b35a711fbf34815284d671cf4677c penlight-1.3.1.tar.gz" -sha512sums="f37972beb6237b3a04ee3be80f43dd33b1f70cd821b05b88d0e3a8271927b32ab73fd4b51332b196e0f22fad4d929ae3024d64cc342f2c2c1032d982dbc2eecb penlight-1.3.1.tar.gz" +md5sums="0315a39834bb6fab07741ec04ede1bf4 penlight-1.3.2.tar.gz" +sha256sums="19b6e6a3afa0fa2f1a627d26d00db6fb117895eb95715ea2ab78ace7edfee849 penlight-1.3.2.tar.gz" +sha512sums="2d9ded6c8d29385ddebbb712626c6ee2989e6a0228e02a33eb1be663e916004e50b08933a25798f3e153dc0d0f4feddce9c397e6b6b86198a11d0b169ac3afae penlight-1.3.2.tar.gz" |