summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-04-13 17:44:44 +0300
committerCaleb Maclennan2020-04-13 17:44:44 +0300
commit908a800a3828ea5c7ed7d221cbafce9328c588aa (patch)
treebcc8860f643dd28489756a3796a46a3a531a38be
parent41b4b6f229f356108eeb4deb64439eac1bf3d63b (diff)
downloadaur-908a800a3828ea5c7ed7d221cbafce9328c588aa.tar.gz
Adopt, overhaul packaging to work with current Luarocks
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD45
2 files changed, 28 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b9389ab0b676..e6e931dec42d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,21 @@
-# Generated by mksrcinfo v8
-# 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.
+ pkgdesc = Encapsulates the protected calls with a coroutine based loop
pkgver = 1.16.0
pkgrel = 1
- url = http://keplerproject.github.io/coxpcall/
- arch = i686
+ url = https://keplerproject.github.io/coxpcall
arch = x86_64
+ arch = i686
license = MIT
+ makedepends = luarocks
source = coxpcall-1_16_0.tar.gz::https://github.com/keplerproject/coxpcall/archive/v1_16_0.tar.gz
- md5sums = 1d25a2e5b0c0cd529b1fdc35dea2a06b
+ sha256sums = b732add4d8c2c56d82a176cf38c11ff1b799c02f220cb29dcd332b91adc34b16
pkgname = lua-coxpcall
depends = lua
- depends = luarocks
-
-pkgname = lua51-coxpcall
- depends = lua51
- depends = luarocks5.1
pkgname = lua52-coxpcall
depends = lua52
- depends = luarocks5.2
+
+pkgname = lua51-coxpcall
+ depends = lua51
diff --git a/PKGBUILD b/PKGBUILD
index 08fe7e9f8a74..4df509517acc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,38 @@
# Maintainer: Stephen Smith <stephen304@gmail.com>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
-pkgname=('lua-coxpcall' 'lua51-coxpcall' 'lua52-coxpcall')
-pkgbase=lua-coxpcall
_rockname=coxpcall
+pkgname=("lua-$_rockname" "lua52-$_rockname" "lua51-$_rockname")
pkgver=1.16.0
+_rockrel=1
_tag=${pkgver//./_}
pkgrel=1
-pkgdesc="Coxpcall encapsulates the protected calls with a coroutine based loop, so errors can be dealed without the usual pcall/xpcall issues with coroutines."
-arch=('i686' 'x86_64')
-url="http://keplerproject.github.io/coxpcall/"
+pkgdesc='Encapsulates the protected calls with a coroutine based loop'
+arch=('x86_64' 'i686')
+url="https://keplerproject.github.io/$_rockname"
license=('MIT')
-source=("${_rockname}-${_tag}.tar.gz::https://github.com/keplerproject/${_rockname}/archive/v${_tag}.tar.gz")
-md5sums=('1d25a2e5b0c0cd529b1fdc35dea2a06b')
+makedepends=('luarocks')
+source=("$_rockname-$_tag.tar.gz::https://github.com/keplerproject/${_rockname}/archive/v$_tag.tar.gz")
+sha256sums=('b732add4d8c2c56d82a176cf38c11ff1b799c02f220cb29dcd332b91adc34b16')
_package_helper() {
- _lua_ver=$1
-
- mkdir -p "$_lua_ver"
cd "$_rockname-$_tag"
- luarocks-${_lua_ver} make --pack-binary-rock --deps-mode=none "rockspec/$_rockname-$pkgver-1.rockspec"
- mv *.rock ../${_lua_ver}/
- luarocks-${_lua_ver} install --tree="$pkgdir/usr/" --deps-mode=none ../${_lua_ver}/*.rock
- find "$pkgdir/usr" -name manifest -delete
+ luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
+ make --deps-mode=none --no-manifest \
+ "rockspec/$_rockname-$pkgver-$_rockrel.rockspec"
}
-package_lua51-coxpcall() {
- depends=('lua51' 'luarocks5.1')
-
- _package_helper "5.1"
+package_lua-coxpcall() {
+ depends+=('lua')
+ _package_helper 5.3
}
package_lua52-coxpcall() {
- depends=('lua52' 'luarocks5.2')
-
- _package_helper "5.2"
+ depends+=('lua52')
+ _package_helper 5.2
}
-package_lua-coxpcall() {
- depends=('lua' 'luarocks')
-
- _package_helper "5.3"
+package_lua51-coxpcall() {
+ depends+=('lua51')
+ _package_helper 5.1
}