mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 20:55:19 +03:00
49 lines
1.4 KiB
Text
49 lines
1.4 KiB
Text
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=lua-binaryheap
|
|
_rockname=binaryheap
|
|
pkgver=0.4
|
|
_pkgver=${pkgver%%.*}v${pkgver#*.}
|
|
pkgrel=0
|
|
pkgdesc="Binary heap implementation in Lua"
|
|
url="https://tieske.github.io/binaryheap.lua/"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="lua"
|
|
checkdepends="lua-busted luajit"
|
|
source="https://github.com/Tieske/binaryheap.lua/archive/version_$_pkgver/binaryheap.lua-$pkgver.tar.gz"
|
|
builddir="$srcdir/binaryheap.lua-version_$_pkgver"
|
|
|
|
_luaversions="5.1 5.2 5.3"
|
|
for _v in $_luaversions; do
|
|
checkdepends="$checkdepends lua$_v lua$_v-busted"
|
|
provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"
|
|
done
|
|
|
|
prepare() {
|
|
default_prepare
|
|
rm .busted
|
|
}
|
|
|
|
check() {
|
|
local lver; for lver in $_luaversions jit; do
|
|
msg "Testing on lua$lver"
|
|
lua$lver /usr/bin/busted || {
|
|
# FIXME: Allow failure on Lua 5.3.
|
|
# https://github.com/Tieske/binaryheap.lua/issues/17
|
|
[ $lver = 5.3 ]
|
|
}
|
|
done
|
|
}
|
|
|
|
package() {
|
|
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"
|
|
|
|
install -m 644 -D "$builddir"/src/binaryheap.lua \
|
|
"$pkgdir"/usr/share/lua/common/binaryheap.lua
|
|
|
|
mkdir -p "$rockdir"
|
|
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
|
|
}
|
|
|
|
sha512sums="2d26108af024f6de5873d9ad2a10dc2fec5b603770c5ff3b3b36289c73261ad6952ed790caad6886bd313a41f9bd42a8257585dd653508d7f1bcd5d1236d2e12 binaryheap.lua-0.4.tar.gz"
|