diff options
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 38 |
2 files changed, 54 insertions, 18 deletions
@@ -1,12 +1,16 @@ pkgbase = lua-busted pkgdesc = Elegant Lua unit testing. pkgver = 2.0.0 - pkgrel = 3 - url = http://olivinelabs.com/busted/ + pkgrel = 4 + url = https://olivinelabs.com/busted/ arch = i686 arch = x86_64 license = MIT makedepends = luarocks + source = busted-2.0.0.tar.gz::https://github.com/Olivine-Labs/busted/archive/v2.0.0.tar.gz + sha256sums = fda34db8cd10142d2a88d6df638a7d0874c295fd2bd6338c745cc546dc5847df + +pkgname = lua-busted depends = lua depends = lua-cliargs depends = lua-dkjson @@ -17,8 +21,28 @@ pkgbase = lua-busted depends = lua-say depends = lua-system depends = lua-term - source = https://luarocks.org/busted-2.0.0-1.rockspec - sha256sums = 7cb1d99772b5c7df08f7798ffb0e5b06c392a778f6b1ab923dc6d02e57497c31 -pkgname = lua-busted +pkgname = lua52-busted + depends = lua52 + depends = lua52-cliargs + depends = lua52-dkjson + depends = lua52-filesystem + depends = lua52-luassert + depends = lua52-mediator + depends = lua52-penlight + depends = lua52-say + depends = lua52-system + depends = lua52-term + +pkgname = lua51-busted + depends = lua51 + depends = lua51-cliargs + depends = lua51-dkjson + depends = lua51-filesystem + depends = lua51-luassert + depends = lua51-mediator + depends = lua51-penlight + depends = lua51-say + depends = lua51-system + depends = lua51-term @@ -1,23 +1,35 @@ # Maintainer: Caleb Maclennan <caleb@alerque.com> -pkgname=lua-busted -pkgver=2.0.0 _rockname=busted +pkgname=("lua-$_rockname" "lua52-$_rockname" "lua51-$_rockname") +pkgver=2.0.0 _rockrel=1 -pkgrel=3 -pkgdesc="Elegant Lua unit testing." +pkgrel=4 +pkgdesc='Elegant Lua unit testing.' arch=('i686' 'x86_64') -url="http://olivinelabs.com/busted/" +url='https://olivinelabs.com/busted/' license=('MIT') _lua_deps=('cliargs' 'dkjson' 'filesystem' 'luassert' 'mediator' 'penlight' 'say' 'system' 'term') -depends=('lua' "${_lua_deps[@]/#/lua-}") makedepends=('luarocks') -conflicts=() -source=("https://luarocks.org/$_rockname-$pkgver-$_rockrel.rockspec") -sha256sums=('7cb1d99772b5c7df08f7798ffb0e5b06c392a778f6b1ab923dc6d02e57497c31') +source=("${_rockname}-${pkgver}.tar.gz::https://github.com/Olivine-Labs/$_rockname/archive/v$pkgver.tar.gz") +sha256sums=('fda34db8cd10142d2a88d6df638a7d0874c295fd2bd6338c745cc546dc5847df') + +_package_helper() { + cd "$_rockname-$pkgver" + luarocks --lua-version=$1 --tree="$pkgdir/usr" install --deps-mode=none --no-manifest "$_rockname-scm-0.rockspec" +} + +package_lua-busted() { + depends+=('lua' "${_lua_deps[@]/#/lua-}") + _package_helper 5.3 +} + +package_lua52-busted() { + depends+=('lua52' "${_lua_deps[@]/#/lua52-}") + _package_helper 5.2 +} -package() { - luarocks --tree="$pkgdir/usr" install --deps-mode=none "$_rockname-$pkgver-$_rockrel.rockspec" - sed -i -e "s#$pkgdir##" "$pkgdir/usr/bin/busted" - find "$pkgdir/usr" -name manifest -delete +package_lua51-busted() { + depends+=('lua51' "${_lua_deps[@]/#/lua51-}") + _package_helper 5.1 } |