mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-18 07:02:29 +01:00
54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=lua-penlight
|
|
_rockname=penlight
|
|
pkgver=1.5.4
|
|
pkgrel=2
|
|
pkgdesc="Lua libraries for extended operations on tables, lists and strings"
|
|
url="http://stevedonovan.github.io/Penlight"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="lua lua-filesystem"
|
|
provides="$pkgname-shared=$pkgver-r$pkgrel" # for backward compatibility
|
|
replaces="$pkgname-shared" # for backward compatibility
|
|
subpackages="$pkgname-doc"
|
|
source="$_rockname-$pkgver.tar.gz::https://github.com/stevedonovan/Penlight/archive/$pkgver.tar.gz"
|
|
builddir="$srcdir/Penlight-$pkgver"
|
|
|
|
# luajit is not available for selected arches
|
|
case "$CARCH" in
|
|
s390x) _luajit="";;
|
|
*) checkdepends="$checkdepends luajit" _luajit="jit";;
|
|
esac
|
|
|
|
_luaversions="5.1 5.2 5.3"
|
|
for _v in $_luaversions; do
|
|
checkdepends="$checkdepends lua$_v"
|
|
provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
|
|
done
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
|
|
local lver; for lver in $_luaversions $_luajit; do
|
|
msg "Testing on Lua $lver"
|
|
lua$lver run.lua tests
|
|
done
|
|
}
|
|
|
|
package() {
|
|
local lmod_dir="$pkgdir/usr/share/lua/common"
|
|
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"
|
|
local docdir="$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
cd "$builddir"
|
|
|
|
mkdir -p "$lmod_dir" "$docdir"
|
|
cp -r lua/pl "$lmod_dir"/
|
|
cp -r examples "$docdir"/
|
|
|
|
mkdir -p "$rockdir"
|
|
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
|
|
}
|
|
|
|
sha512sums="c46e7875410a90390bfbf010a53f1d536475e2094668722618d03951caad0fcb0674c9bc7119a0753e4ed3df9e4d70fef828ba4c6c24e8ada4036948d2432519 penlight-1.5.4.tar.gz"
|