From fc8e2ecf9fe88295494e539728796f13dda67897 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Wed, 18 Dec 2024 22:47:15 -0600 Subject: Inital commit --- init | 14 ++++++++++++++ meta.lua | 48 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/init b/init index 642d265..9d9ba52 100755 --- a/init +++ b/init @@ -1 +1,15 @@ #!/bin/sh -ex + +cp luaossl-packaging/luaossl-git.rockspec luaossl +cd luaossl +luarocks config variables.CFLAGS " $CFLAGS" +luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec +obj="luaossl-git.$(luarocks config arch).rock" +cp $obj /root +cd /root +if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then + # And pack the library with upx + unzip $obj lib/* + upx --no-progress lib/* + zip -r "$obj" lib +fi diff --git a/meta.lua b/meta.lua index 55278d2..470b515 100644 --- a/meta.lua +++ b/meta.lua @@ -1,6 +1,44 @@ -return { - ["luaossl"] = { - 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 = "luaossl-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image + builds[buildname] = { + image = "image-luarocks-" .. version.. "-" .. image, + requires = { + {"git", "luaossl"}, + {"cicd","image-luarocks-" .. version .. "-" .. image}, + {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, + }, + produces = { + ["luaossl-git.mingw32-x86_64.rock"] = {"luarocks.sh", "luaossl", image, version, name, rel}, + }, + env = { + CFLAGS = optimization .. " " .. flag, + rockver = version:gsub("(%d)(%d)$","%1.%2"), + version = version + }, + } + break +end + +return builds -- cgit v1.2.3-55-g6feb