mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-10 10:22:00 +01:00
testing/lua-mqtt: new aport
This commit is contained in:
parent
c48ce2574f
commit
5cd0dc4d4d
58
testing/lua-mqtt/APKBUILD
Normal file
58
testing/lua-mqtt/APKBUILD
Normal file
@ -0,0 +1,58 @@
|
||||
# Contributor: Will Sinatra <wpsinatra@gmail.com>
|
||||
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
|
||||
pkgname=lua-mqtt
|
||||
_pkgname=luamqtt
|
||||
pkgver=3.4.3
|
||||
pkgrel=0
|
||||
pkgdesc="Pure-lua MQTT v3.1.1 and v5.0 client"
|
||||
url="https://github.com/xHasKx/luamqtt"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="lua-socket lua-sec"
|
||||
checkdepends="lua-busted"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/xHasKx/$_pkgname/archive/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pkgname-$pkgver"
|
||||
options="!check" # tests require MQTT broker
|
||||
|
||||
_luaversions="5.1 5.2 5.3 5.4"
|
||||
for _v in $_luaversions; do
|
||||
checkdepends="$checkdepends lua$_v lua$_v-busted"
|
||||
case $_v in
|
||||
5.1)
|
||||
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
|
||||
;;
|
||||
*)
|
||||
provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
check() {
|
||||
local lver; for lver in $_luaversions; do
|
||||
msg "Testing on lua$lver"
|
||||
lua$lver /usr/bin/busted
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_pkgname/$pkgver-1"
|
||||
local outdir="$pkgdir/usr/share/lua/common/mqtt/"
|
||||
|
||||
mkdir -p "$outdir"
|
||||
install -D -m 644 "$builddir"/mqtt/*.lua "$outdir"
|
||||
|
||||
mkdir -p "$rockdir"
|
||||
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
|
||||
}
|
||||
|
||||
_subpackage() {
|
||||
pkgdesc="$pkgdesc (for Lua 5.1)"
|
||||
depends="$pkgname=$pkgver-r$pkgrel lua5.1-bitop"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel lua5.1"
|
||||
|
||||
mkdir -p "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
51de02c99a4cd3c081a7a4f06a9eaea4eae6b3735d9ab1c18d858eb4e6951e615c5728dce6483fd7b66359804ff85ac998c1927f85e67eaef394d934c9369459 lua-mqtt-3.4.3.tar.gz
|
||||
"
|
||||
Loading…
x
Reference in New Issue
Block a user