From 249ee384da87b747496820627ccee24fb505862d Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Tue, 13 Aug 2024 16:48:51 -0500 Subject: Use luarocks image --- init | 5 +++++ meta.lua | 27 +++++++-------------------- prepare | 17 ----------------- 3 files changed, 12 insertions(+), 37 deletions(-) delete mode 100755 prepare diff --git a/init b/init index 642d265..87b093a 100755 --- a/init +++ b/init @@ -1 +1,6 @@ #!/bin/sh -ex + +cd luafilesystem +luarocks config variables.CFLAGS "$CFLAGS" +luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec +cp luafilesystem-scm-1.mingw32-x86_64.rock /root diff --git a/meta.lua b/meta.lua index 218ee05..7234147 100644 --- a/meta.lua +++ b/meta.lua @@ -24,34 +24,21 @@ local debug = { local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} local builds = {} -for _,image,lua_ver,link in cartesian(compilers,lua_versions) do - builds["image-luafilesystem-" .. image .. "-lua" .. lua_ver] = { - image = "image-" .. image, - requires = { - {"http",link} - }, - produces = {}, - export = true, - entrypoint = "prepare", - env = { - rockver = lua_ver:gsub("(%d)(%d)$","%1.%2") - } - } -end for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do - local name = "luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image - builds[name] = { - image = "image-luafilesystem-" .. image .. "-lua" .. version, + builds["luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image] = { + image = "image-luarocks-" .. version.. "-" .. image, requires = { {"git", "luafilesystem"}, - {"cicd","image-luafilesystem-" .. image .. "-lua" .. version}, + {"cicd","image-luarocks-" .. version .. "-" .. image}, + {"cicd","lua" .. version .. "-" .. optimization .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"} }, produces = { - "luafilesystem-git-1.win32-" .. image .. ".rock" + "luafilesystem-scm-1.mingw32-x86_64.rock" }, env = { CFLAGS = optimization .. " " .. flag, - rockver = version:gsub("(%d)(%d)$","%1.%2") + rockver = version:gsub("(%d)(%d)$","%1.%2"), + version = version }, } end diff --git a/prepare b/prepare deleted file mode 100755 index f669f86..0000000 --- a/prepare +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -ex - -rc-service networking start - -apk add luarocks$rockver -luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") -mkdir "$luaver" -tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 -rm /root/$luaver/src/*.c -rm -rf /root/$luaver/doc -rm -rf /root/$luaver/test -rm -rf /root/$luaver/etc -rm /root/*.tar.gz -rm -rf /root/image-mingw64 -rm -rf /root/luafilesystem-packaging -luarocks-$rockver config variables.LUA_INCDIR "/root/$luaver/src" -luarocks-$rockver config variables.CFLAGS "$CFLAGS" -- cgit v1.2.3-55-g6feb