diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 25 insertions, 13 deletions
@@ -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 } |