Date: Saturday, December 25, 2021 @ 21:20:58 Author: alerque Revision: 1083798
Migrate busted from AUR Added: busted/ busted/repos/ busted/trunk/ busted/trunk/PKGBUILD ----------+ PKGBUILD | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) Added: busted/trunk/PKGBUILD =================================================================== --- busted/trunk/PKGBUILD (rev 0) +++ busted/trunk/PKGBUILD 2021-12-25 21:20:58 UTC (rev 1083798) @@ -0,0 +1,68 @@ +# Maintainer: Caleb Maclennan <ca...@alerque.com> + +pkgbase=busted +pkgname=("$pkgbase" "lua-$pkgbase" "lua53-$pkgbase" "lua52-$pkgbase" "lua51-$pkgbase") +pkgver=2.0.0 +_rockrel=0 +pkgrel=11 +pkgdesc='Elegant Lua unit testing' +arch=(any) +url="https://olivinelabs.com/$pkgbase" +license=(MIT) +_luadeps=(cliargs + dkjson + filesystem + luassert + mediator + penlight + say + system + term) +makedepends=(lua + lua51 + lua52 + lua53 + luarocks) +_archive="$pkgbase-$pkgver" +source=("$_archive.tgz::https://github.com/Olivine-Labs/$pkgbase/archive/v$pkgver.tar.gz") +sha256sums=('fda34db8cd10142d2a88d6df638a7d0874c295fd2bd6338c745cc546dc5847df') + +_package() { + cd "$_archive" + luarocks --lua-version="$1" --tree="$pkgdir/usr/" \ + make --deps-mode=none --no-manifest "rockspecs/$_archive-$_rockrel.rockspec" + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE + if [[ $pkgname =~ lua* ]]; then + rm -rf "$pkgdir/usr/bin" + else + rm -rf "$pkgdir/usr/share/lua" + rm -rf "$pkgdir/usr/lib" + find "$pkgdir/usr/bin" -type f -execdir sed -i -e "s#$pkgdir##" {} \; + fi +} + +package_busted() { + _package 5.4 + pkgdesc+=' (CLI)' + depends=(lua "lua-$pkgname") +} + +package_lua-busted() { + _package 5.4 + depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}") +} + +package_lua51-busted() { + _package 5.1 + depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}") +} + +package_lua52-busted() { + _package 5.2 + depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}") +} + +package_lua53-busted() { + _package 5.3 + depends=("${pkgname%-*}" "${_luadeps[@]/#/${pkgname%-*}-}") +}