diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-12 22:11:01 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-12 22:11:34 +0100 |
commit | 041c150fbdb9db8ec7b83f56297a05e17aba0f57 (patch) | |
tree | 2d17d8d3fb55040aa9b7a2142bff1a9bfb46bc03 /community/lua-system/APKBUILD | |
parent | 980a484c36abf2345cd67f9036a9bbdbaf9a49b2 (diff) | |
download | aports-041c150fbdb9db8ec7b83f56297a05e17aba0f57.tar.bz2 aports-041c150fbdb9db8ec7b83f56297a05e17aba0f57.tar.xz |
community/lua-system: move from testing
Diffstat (limited to 'community/lua-system/APKBUILD')
-rw-r--r-- | community/lua-system/APKBUILD | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/community/lua-system/APKBUILD b/community/lua-system/APKBUILD new file mode 100644 index 0000000000..372bb001a4 --- /dev/null +++ b/community/lua-system/APKBUILD @@ -0,0 +1,60 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=lua-system +_pkgname=luasystem +pkgver=0.2.1 +pkgrel=0 +pkgdesc="Platform independent system calls for Lua" +url="https://github.com/o-lim/luasystem/" +arch="all" +license="MIT" +makedepends="" +subpackages="" +source="$pkgname-$pkgver.tar.gz::https://github.com/o-lim/$_pkgname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" +# This module needs lua-busted to run tests, but lua-busted depends on +# lua-system and we wanna avoid circular dependencies. +options="!check" + +_luaversions="5.1 5.2 5.3" +for _v in $_luaversions; do + makedepends="$makedepends lua$_v-dev" + subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" +done + +prepare() { + default_prepare || return 1 + + local lver; for lver in $_luaversions; do + cp -r "$builddir" "$builddir-$lver" || return 1 + done +} + +build() { + local lver; for lver in $_luaversions; do + msg "Building against Lua $lver..." + make -C "$builddir-$lver"/src \ + LUA_VERSION=$lver \ + MYCFLAGS="$CFLAGS" || return 1 + done +} + +package() { + mkdir -p "$pkgdir" +} + +_subpackage() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc $lver" + depends="lua$lver" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + local lmod_dir=$(pkg-config --variable=INSTALL_LMOD lua$lver) + + cd "$builddir-$lver" + + make -C src LUA_VERSION=$lver DESTDIR="$subpkgdir" prefix=/usr \ + install || return 1 + install -m 644 -D system/init.lua "$subpkgdir"/$lmod_dir/system.lua +} + +sha512sums="b8a04a83e8e39c98da23484c9eba9ff60da2fb4db3deca0d52784a6c13c7e0faf7a8b326999d88703847107e4fce739062fc04a00266140969c9f57b70064f46 lua-system-0.2.1.tar.gz" |