| 1 | # Contributor: Alex Dowad <[email protected]> |
| 2 | # Maintainer: Alex Dowad <[email protected]> |
| 3 | pkgname=lua-stacktraceplus |
| 4 | pkgver=0.1.2 |
| 5 | pkgrel=0 |
| 6 | pkgdesc="Enhanced stack traces for Lua 5.1, 5.2, 5.3, LuaJIT, and OpenResty" |
| 7 | url="https://github.com/ignacio/StackTracePlus" |
| 8 | arch="noarch" |
| 9 | license="MIT" |
| 10 | source="$pkgname-$pkgver.tar.gz::https://github.com/ignacio/StackTracePlus/archive/refs/tags/$pkgver-1.tar.gz" |
| 11 | builddir="$srcdir/StackTracePlus-$pkgver-1" |
| 12 | checkdepends="lua5.1 luacheck" |
| 13 | |
| 14 | check() { |
| 15 | # Warning 213 is for unused loop variable; this has been fixed on master but not yet released |
| 16 | # Warnings 611/614 are for trailing whitespace; sent PR to upstream (https://github.com/ignacio/StackTracePlus/pull/15) |
| 17 | luacheck --no-max-line-length ./src/StackTracePlus.lua --ignore 213/i 611 614 |
| 18 | |
| 19 | # StackTracePlus has a unit test suite which can be run with 'lua ./unittest/run.lua' |
| 20 | # However, it requires the 'lunitx' test framework (https://github.com/dcurrie/lunit), |
| 21 | # and we don't currently have lunitx packaged for Alpine Linux |
| 22 | } |
| 23 | |
| 24 | package() { |
| 25 | mkdir -p "$pkgdir/usr/share/lua/common" |
| 26 | cp "$builddir/src/StackTracePlus.lua" "$pkgdir/usr/share/lua/common/" |
| 27 | } |
| 28 | |
| 29 | sha512sums=" |
| 30 | a8c8620f9d15ac9446c9d4c7d1741d547cb5e02d944979f8f6a961388ac9dd5ae61bc0262ffdc01ca792d5ca9eac85a391c728f576ae436604d0c8e52194733a lua-stacktraceplus-0.1.2.tar.gz |
| 31 | " |