diff options
-rw-r--r-- | main/lua-alt-getopt/APKBUILD | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/main/lua-alt-getopt/APKBUILD b/main/lua-alt-getopt/APKBUILD index 5ac5b01a8..b69ee6440 100644 --- a/main/lua-alt-getopt/APKBUILD +++ b/main/lua-alt-getopt/APKBUILD @@ -1,15 +1,15 @@ # Maintainer: Natanael Copa <ncopa@alpinlinux.org> pkgname=lua-alt-getopt pkgver=0.7.0 -pkgrel=2 +pkgrel=3 pkgdesc="Lua module for processing options similar to getopt_long(3)" url="http://luaforge.net/projects/alt-getopt/" arch="noarch" license="MIT" -depends="lua" +depends="lua5.1-alt-getopt lua5.2-alt-getopt" makedepends= install= -subpackages= +subpackages="lua5.1-alt-getopt:_51 lua5.2-alt-getopt:_52" source="http://mova.org/~cheusov/pub/lua_alt_getopt/lua-alt-getopt-$pkgver.tar.gz" _builddir="$srcdir"/$pkgname-$pkgver @@ -23,7 +23,22 @@ build() { package() { cd "$_builddir" - install -Dm644 alt_getopt.lua "$pkgdir"/usr/share/lua/5.1/alt_getopt.lua + mkdir -p "$pkgdir"/usr/share/lua/5.1 "$pkgdir"/usr/share/lua/5.2 + install -Dm644 alt_getopt.lua "$pkgdir"/usr/share/lua/5.2/alt_getopt.lua + ln -s ../5.2/pl "$pkgdir"/usr/share/lua/5.1/alt-getopt.lua +} + +_52() { + depends="" + mkdir -p "$subpkgdir"/usr/share/lua/ + mv "$pkgdir"/usr/share/lua/5.2 "$subpkgdir"/usr/share/lua/ +} + +_51() { + replaces="lua-alt-getopt" + depends="lua5.2-alt-getopt" + mkdir -p "$subpkgdir"/usr/share/lua/ + mv "$pkgdir"/usr/share/lua/5.1 "$subpkgdir"/usr/share/lua/ } md5sums="f504578b1287ea02759add231b972812 lua-alt-getopt-0.7.0.tar.gz" |