From f5af62214022da29708ad2b14f1a968d9256e959 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Mon, 16 Feb 2026 20:12:56 -0600 Subject: Start working on packaging --- meta.lua | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 5 deletions(-) (limited to 'meta.lua') diff --git a/meta.lua b/meta.lua index 8a67aaa..8d35837 100644 --- a/meta.lua +++ b/meta.lua @@ -1,6 +1,54 @@ -return { - ["luasocket"] = { - requires = {}, - produces = {}, - } +local lua_versions = { + ["51"] = true, + ["52"] = true, + ["53"] = true, + ["54"] = true, } + +local optimizations = { + tiny = "-Oz", + size = "-Os", + zero = "-O0", + one = "-O1", + two = "-O2", + three = "-O3", + debug = "-Og", +} + +local debug = { + release = "", + debug = "-g", +} +local compilers = { + --[[ + "mingw32", + ]] + "mingw64", + --[[ + "clang32", + "clang64", + ]] +} +local builds = {} + +for version, _, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do + local buildname = "lusocket-" .. version .. "-" .. image + builds[buildname] = { + image = "image-luarocks-" .. version .. "-" .. image, + requires = { + {"git", "lpeg"}, + {"cicd", "image-luarocks-" .. version .. "-" .. image}, + {"cicd", "lua" .. table.concat({version, name, rel, image}, "-") .. ":lua" .. version .. ".dll"}, + }, + produces = { + ["lusocket-3.1.0-1.mingw32-x86_64.rock"] = {"luarocks.sh", "luasocket", image, version, name, rel}, + }, + env = { + CFLAGS = optimization .. " " .. flag, + rockver = version:gsub("(%d)(%d)$", "%1.%2"), + version = version, + }, + } +end + +return builds -- cgit v1.2.3-55-g6feb