aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-term
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-12 22:11:01 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-12 22:11:33 +0100
commite33123c47537d161278d85105b1f5f01e672a8be (patch)
treebee579a6748f85a5724afb70744bbfd34cbcce5c /community/lua-term
parent6b40cb08696dfaf1de500a5e5644eefd9f4f3845 (diff)
downloadaports-e33123c47537d161278d85105b1f5f01e672a8be.tar.bz2
aports-e33123c47537d161278d85105b1f5f01e672a8be.tar.xz
community/lua-term: move from testing
Diffstat (limited to 'community/lua-term')
-rw-r--r--community/lua-term/APKBUILD51
1 files changed, 51 insertions, 0 deletions
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 <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+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"