summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Smith2019-01-27 18:09:08 -0500
committerStephen Smith2019-01-27 18:09:08 -0500
commit81ee0745a8a1c272c59d460c46164886a25fa4eb (patch)
tree934537e61b6bef49427a3d0d5475bfd4c3d21f02
parent37705f30e92897f521990352616a6ea6b3dbcd20 (diff)
downloadaur-81ee0745a8a1c272c59d460c46164886a25fa4eb.tar.gz
Split package to add lua 5.1 and 5.2
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD36
2 files changed, 38 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f03f25700368..b9389ab0b676 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sat Jan 26 02:39:25 UTC 2019
+# Sun Jan 27 23:07:35 UTC 2019
pkgbase = lua-coxpcall
pkgdesc = Coxpcall encapsulates the protected calls with a coroutine based loop, so errors can be dealed without the usual pcall/xpcall issues with coroutines.
pkgver = 1.16.0
@@ -8,10 +8,18 @@ pkgbase = lua-coxpcall
arch = i686
arch = x86_64
license = MIT
- makedepends = luarocks
- depends = lua
source = coxpcall-1_16_0.tar.gz::https://github.com/keplerproject/coxpcall/archive/v1_16_0.tar.gz
md5sums = 1d25a2e5b0c0cd529b1fdc35dea2a06b
pkgname = lua-coxpcall
+ depends = lua
+ depends = luarocks
+
+pkgname = lua51-coxpcall
+ depends = lua51
+ depends = luarocks5.1
+
+pkgname = lua52-coxpcall
+ depends = lua52
+ depends = luarocks5.2
diff --git a/PKGBUILD b/PKGBUILD
index dd4b0023537a..645af3b17ead 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,7 @@
# Maintainer: Stephen Smith <stephen304@gmail.com>
-pkgname=lua-coxpcall
+pkgname=('lua-coxpcall' 'lua51-coxpcall' 'lua52-coxpcall')
+pkgbase=lua-coxpcall
_rockname=coxpcall
pkgver=1.16.0
_tag=${pkgver//./_}
@@ -9,18 +10,35 @@ pkgdesc="Coxpcall encapsulates the protected calls with a coroutine based loop,
arch=('i686' 'x86_64')
url="http://keplerproject.github.io/coxpcall/"
license=('MIT')
-depends=('lua')
-makedepends=('luarocks')
-conflicts=()
source=("${_rockname}-${_tag}.tar.gz::https://github.com/keplerproject/${_rockname}/archive/v${_tag}.tar.gz")
md5sums=('1d25a2e5b0c0cd529b1fdc35dea2a06b')
-build() {
+_package_helper() {
+ _lua_ver=$1
+
+ mkdir -p "$_lua_ver"
cd "$_rockname-$_tag"
- luarocks make --pack-binary-rock --deps-mode=none "rockspec/$_rockname-$pkgver-1.rockspec"
-}
+ luarocks-${_lua_ver} make --pack-binary-rock --deps-mode=none "rockspec/$_rockname-$pkgver-1.rockspec"
+ mv *.rock ../${_lua_ver}/
-package() {
- luarocks install --tree="$pkgdir/usr/" --deps-mode=none "$_rockname-$_tag"/*.rock
+ luarocks-${_lua_ver} install --tree="$pkgdir/usr/" --deps-mode=none ../${_lua_ver}/*.rock
find "$pkgdir/usr" -name manifest -delete
}
+
+package_lua51-coxpcall() {
+ depends=('lua51' 'luarocks5.1')
+
+ _package_helper "5.1"
+}
+
+package_lua52-coxpcall() {
+ depends=('lua52' 'luarocks5.2')
+
+ _package_helper "5.2"
+}
+
+package_lua-coxpcall() {
+ depends=('lua' 'luarocks')
+
+ _package_helper "5.3"
+}