diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-26 07:43:31 +0000 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-26 07:44:34 +0000 |
| commit | 3eaaab362d8e55b856dc513c2bcbed581a12fe41 (patch) | |
| tree | e12d10a4c68b6500a6b16e418c72219279c08b49 | |
| parent | 55cec37dba7639a270275b41e163452b1f8076ce (diff) | |
| download | aports-3eaaab362d8e55b856dc513c2bcbed581a12fe41.tar.bz2 aports-3eaaab362d8e55b856dc513c2bcbed581a12fe41.tar.xz | |
main/lua-penlight: add support for Lua 5.2
ref #2779
| -rw-r--r-- | main/lua-penlight/APKBUILD | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/main/lua-penlight/APKBUILD b/main/lua-penlight/APKBUILD index 489504ac1f..b26488c979 100644 --- a/main/lua-penlight/APKBUILD +++ b/main/lua-penlight/APKBUILD @@ -1,30 +1,59 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lua-penlight pkgver=1.3.1 -pkgrel=0 +pkgrel=1 pkgdesc="Lua libraries for extended operations on tables, lists and strings" -url="http://penlight.luaforge.net/" +url="http://stevedonovan.github.io/Penlight" arch="noarch" -license="GPL" -depends="lua-filesystem" -makedepends="wget" +license="MIT" +depends="lua5.1-penlight" +makedepends="" install= -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-shared + lua5.1-penlight:_51 + lua5.2-penlight:_52" source="penlight-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz" _builddir="$srcdir"/Penlight-$pkgver build() { - return 0 + cd "$_builddir" + # fix permissions of scripts + chmod -x lua/pl/*.lua } package() { cd "$_builddir" - mkdir -p "$pkgdir"/usr/share/lua/5.1/ \ + 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/5.1/ - cp -r docs/* "$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 +} + +shared() { + pkgdesc="penlight files that are shared for all supported Lua versions" + depends= + mkdir -p "$subpkgdir"/usr/share/lua/ + 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" + mkdir -p "$subpkgdir"/usr/share/lua/ + mv "$pkgdir"/usr/share/lua/5.2 "$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/ } md5sums="831f8ce7d3d5c872d129ad5db54a8424 penlight-1.3.1.tar.gz" |
