From ef67f4e6d5076293e7a6a370a6f83be3e9a5ef37 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 11 Sep 2016 17:24:56 +0200 Subject: community/lua-compat53: move from testing --- community/lua-compat53/APKBUILD | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 community/lua-compat53/APKBUILD (limited to 'community/lua-compat53') diff --git a/community/lua-compat53/APKBUILD b/community/lua-compat53/APKBUILD new file mode 100644 index 0000000000..7967873add --- /dev/null +++ b/community/lua-compat53/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +_luaversions="5.1 5.2 5.3" +pkgname=lua-compat53 +_pkgname=lua-compat-5.3 +pkgver=0.3 +pkgrel=0 +pkgdesc="Compatibility module providing Lua-5.3-style APIs for Lua" +url="https://github.com/keplerproject/lua-compat-5.3" +arch="noarch" +license="MIT" +depends="" +makedepends="" +subpackages="" +for _v in $_luaversions; do + makedepends="$makedepends lua$_v-dev luarocks$_v" + subpackages="$subpackages lua$_v-${pkgname#lua-}:_package" +done +source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + + local lver; for lver in $_luaversions; do + msg "Building for Lua $lver..." + + luarocks-$lver \ + CC="$CC" \ + CFLAGS="$CFLAGS -fPIC" \ + LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \ + LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \ + make --tree=./build rockspecs/compat53-scm-0.rockspec + done +} + +package() { + mkdir -p "$pkgdir" +} + +_package() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc $lver" + arch="all" + depends="lua$lver" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + + local path; for path in lib/lua/$lver share/lua/$lver; do + mkdir -p "$subpkgdir"/usr/${path%/*} + mv "$builddir"/build/$path "$subpkgdir"/usr/$path/ || return 1 + done +} + +md5sums="98f93f9de24b26ee5f6f7053979599f8 lua-compat53-0.3.tar.gz" +sha256sums="ac61979b944b17a245c6b1a696a23b18e664296d392dc1966788afda6a911ccd lua-compat53-0.3.tar.gz" +sha512sums="e8be1e0327c445b2025f52b578ecf1e842a108785268e1b82bf3999d00f352ac450d0b5bd22f2c63e382d178fae0b86989c67d8c91eddcf8994eb9c5fc0569c5 lua-compat53-0.3.tar.gz" -- cgit v1.2.3