aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2021-03-05 15:44:52 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2021-03-05 15:44:52 +0000
commit8de1e3fd882d0c9ab40f8ac0fc307a9ee78c81bf (patch)
treed5ca572c52c8cd786e3799e6e24dea4ed1ff0afe
parent86d41f1076978e0bda6527d1726c74b32f94345c (diff)
downloadaports-8de1e3fd882d0c9ab40f8ac0fc307a9ee78c81bf.tar.gz
aports-8de1e3fd882d0c9ab40f8ac0fc307a9ee78c81bf.tar.bz2
aports-8de1e3fd882d0c9ab40f8ac0fc307a9ee78c81bf.tar.xz
community/lua-luatz: new aport
-rw-r--r--community/lua-luatz/APKBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/community/lua-luatz/APKBUILD b/community/lua-luatz/APKBUILD
new file mode 100644
index 0000000000..8ffb714555
--- /dev/null
+++ b/community/lua-luatz/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=lua-luatz
+_pkgname=${pkgname/lua-/}
+pkgver=0.4.1
+_ver=${pkgver//./-}
+_pkgver=${_ver/-/.}
+pkgrel=0
+pkgdesc="Time, Date and Timezone library for lua"
+url="https://daurnimator.github.io/luatz/"
+arch="noarch"
+license="MIT"
+checkdepends="lua-busted luajit"
+depends="tzdata"
+# /etc/locatime is not installed by default
+options="!check"
+source="$pkgname-$pkgver.tar.gz::https://github.com/daurnimator/luatz/archive/v$_pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$_pkgver
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage:noarch"
+ checkdepends="$checkdepends lua$_v"
+done
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+check() {
+ local lver; for lver in $_luaversions jit; do
+ msg "Testing on lua$lver"
+ lua$lver /usr/bin/busted
+ done
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+ local lmod_dir="$subpkgdir/usr/share/lua/$lver"
+ local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-1"
+
+ cd $builddir
+ mkdir -p "$lmod_dir"
+ cp -r $_pkgname "$lmod_dir"/
+
+ mkdir -p "$rockdir"
+ echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
+}
+
+
+sha512sums="87e53afa85aa66cc0359d9581eb3dd9974f6ceb11cb57b0bfc6745d9bb1b6dbc90520fb6834e5de85b7fc46ff44c5d35dfd7136547a1973585f8cbf8707b45d1 lua-luatz-0.4.1.tar.gz"