mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-13 16:14:24 +02:00
We want to prevent any forking calls in the global scope to speed up tools that need to gather metadata from all aports. There is no posix compatible way to change the case of a variable, so lets just hardcode the upstream package name.
42 lines
1.1 KiB
Text
42 lines
1.1 KiB
Text
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
|
|
pkgname=lua-unit
|
|
_pkgname=LUAUNIT
|
|
pkgver=3.4
|
|
_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 5.4"
|
|
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="
|
|
a7440b730d60438d5de6887bee116b4661ce5667c911a1acb3600ccad75db90a4a164e87b9253d9ebfa836738ed3c83bcf122161c4ef4fe982671ce993e2a83d LUAUNIT_V3_4.tar.gz
|
|
"
|