diff options
author | Stephen Smith | 2019-01-27 18:48:51 -0500 |
---|---|---|
committer | Stephen Smith | 2019-01-27 18:48:51 -0500 |
commit | dd7528fac3368cacb90d4de347934f1365c0d9a7 (patch) | |
tree | 0fae67bb708075c52be0e3f4ce04d1ec5ff8a1ea /PKGBUILD | |
parent | a2584135de5232fe66aad6d17f153725d1788532 (diff) | |
download | aur-dd7528fac3368cacb90d4de347934f1365c0d9a7.tar.gz |
Split package to add lua 5.1 and 5.2
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 36 |
1 files changed, 27 insertions, 9 deletions
@@ -1,6 +1,7 @@ # Maintainer: Stephen Smith <stephen304@gmail.com> -pkgname=lua-wsapi +pkgname=('lua-wsapi' 'lua51-wsapi' 'lua52-wsapi') +pkgbase=lua-wsapi _rockname=wsapi pkgver=1.7 pkgrel=1 @@ -8,18 +9,35 @@ pkgdesc="WSAPI is an API that abstracts the web server from Lua web applications arch=('i686' 'x86_64') url="http://keplerproject.github.com/wsapi" license=('MIT') -depends=('lua' 'lua-luafilesystem' 'lua-rings' 'lua-coxpcall') -makedepends=('luarocks') -conflicts=() source=("${_rockname}-${pkgver}.tar.gz::https://github.com/keplerproject/${_rockname}/archive/v${pkgver}.tar.gz") md5sums=('aacadf9dabeb82b044cb3f1006c5df0d') -build() { +_package_helper() { + _lua_ver=$1 + + mkdir -p "$_lua_ver" cd "$_rockname-$pkgver" - 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-$pkgver"/*.rock + luarocks-${_lua_ver} install --tree="$pkgdir/usr/" --deps-mode=none ../${_lua_ver}/*.rock find "$pkgdir/usr" -name manifest -delete } + +package_lua51-wsapi() { + depends=('lua51' 'lua51-filesystem' 'lua51-rings' 'lua51-coxpcall' 'luarocks5.1') + + _package_helper "5.1" +} + +package_lua52-wsapi() { + depends=('lua52' 'lua52-filesystem' 'lua52-rings' 'lua52-coxpcall' 'luarocks5.2') + + _package_helper "5.2" +} + +package_lua-wsapi() { + depends=('lua' 'lua-filesystem' 'lua-rings' 'lua-coxpcall' 'luarocks') + + _package_helper "5.3" +} |