# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=lua-date _rockname=date pkgver=2.2 pkgrel=0 pkgdesc="Date & Time module for Lua 5.x" url="https://github.com/Tieske/date" arch="noarch" license="MIT" depends="lua" checkdepends="lua-busted" source="https://github.com/Tieske/$_rockname/archive/version_$pkgver/lua-date-$pkgver.tar.gz" builddir="$srcdir/date-version_$pkgver" _luaversions="5.1 5.2 5.3" for _v in $_luaversions; do checkdepends="$checkdepends lua$_v lua$_v-busted" done case "$CARCH" in ppc64le) _luajit="" ;; *) checkdepends="$checkdepends luajit"; _luajit="jit" ;; esac check() { local lver; for lver in $_luaversions $_luajit; do msg "Testing on lua$lver" lua$lver /usr/bin/busted --no-coverage done } package() { local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1" install -m 644 -D "$builddir"/src/date.lua \ "$pkgdir"/usr/share/lua/common/date.lua mkdir -p "$rockdir" echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } sha512sums=" cebf3532d3b127df1b8439bb395fa81929c89cd897930164c6e391d6a65dd93fe2f03ebd0c77312a6a2ed1ed7fa24308862ca7ca44c5bf84cbe7150ef2dce429 lua-date-2.2.tar.gz "