aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2019-06-18 13:19:11 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-06-18 13:19:24 +0000
commitc8d5292fcc124b3cde16a4eb5c94748dfe97b378 (patch)
tree9bd0eafb1ef5a7820e153f486afbbfcaeeb680d6
parentc5e732dcb07efec0f81bc3d6339ca6b1e9568792 (diff)
downloadaports-c8d5292fcc124b3cde16a4eb5c94748dfe97b378.tar.gz
aports-c8d5292fcc124b3cde16a4eb5c94748dfe97b378.tar.bz2
aports-c8d5292fcc124b3cde16a4eb5c94748dfe97b378.tar.xz
main/lua-unit: new aport
unit-testing framework for Lua
-rw-r--r--main/lua-unit/APKBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/lua-unit/APKBUILD b/main/lua-unit/APKBUILD
new file mode 100644
index 0000000000..16b968369b
--- /dev/null
+++ b/main/lua-unit/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=lua-unit
+_pkgname=$(echo ${pkgname/-/} | tr '[:lower:]' '[:upper:]')
+pkgver=3.3
+_pkgver=${pkgver/./_}
+pkgrel=0
+pkgdesc="Unit-testing framework for Lua"
+url="https://github.com/bluebird75/luaunit"
+arch="noarch"
+license="BSD-2-Clause"
+depends="lua5.2"
+makedepends="python3"
+options="!check" # test suite suitable for Windows only
+source="https://github.com/bluebird75/luaunit/archive/${_pkgname}_V${_pkgver}.tar.gz"
+builddir="$srcdir"/${pkgname/-/}-${_pkgname}_V${_pkgver}
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+check() {
+ python3 doit.py runtests
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+ install -m644 -D "$builddir"/luaunit.lua \
+ "$subpkgdir"/usr/share/lua/$lver/luaunit.lua
+}
+
+sha512sums="bf0ea8f714fe93123ca019e7c9a61fb81592f1300a7943ca2f1d0717c1882d673316f4c800e6204c38cdc4e90467f35475df9a6420e4d675d753db46d2ca57ac LUAUNIT_V3_3.tar.gz"