From e33123c47537d161278d85105b1f5f01e672a8be Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 12 Mar 2017 22:11:01 +0100 Subject: community/lua-term: move from testing --- community/lua-term/APKBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 community/lua-term/APKBUILD (limited to 'community/lua-term') diff --git a/community/lua-term/APKBUILD b/community/lua-term/APKBUILD new file mode 100644 index 0000000000..84a11ee426 --- /dev/null +++ b/community/lua-term/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=lua-term +pkgver=0.07 +pkgrel=0 +pkgdesc="Terminal operations for Lua" +url="https://github.com/hoelzro/lua-term" +arch="all" +license="MIT" +makedepends="" +subpackages="" +source="$pkgname-$pkgver.tar.gz::https://github.com/hoelzro/$pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgver" +options="!check" # upstream does not provide tests + +_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 for Lua $lver..." + make -C "$builddir-$lver" LUA_VER=$lver CFLAGS="$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" + + cd "$builddir-$lver" + make LUA_VER=$lver LUA_DIR="$subpkgdir/usr" install +} + +sha512sums="2046ba1861ff590c191bb651941c45eb8b6e9a1252b05e78daaeb31837ce1fc7da9ba124aec34dc7842fd304e945754c463ffd75941125ff952e911ba66efa31 lua-term-0.07.tar.gz" -- cgit v1.2.3