summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-12-09 02:19:51 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-12-09 02:19:51 -0600
commitd665ff9226d474a3c7a59deb00406ded4de6e1fe (patch)
treef662d6b9218d3027fed05d8fb17c1f7eeca82c12
parenta7ed88210908c664fafdbbf2d85212462db153e7 (diff)
downloadlua-term-packaging-master.tar.gz
lua-term-packaging-master.tar.bz2
lua-term-packaging-master.zip
Inital stab at buildingHEADmaster
-rwxr-xr-xinit13
-rw-r--r--meta.lua47
2 files changed, 55 insertions, 5 deletions
diff --git a/init b/init
index 642d265..827073c 100755
--- a/init
+++ b/init
@@ -1 +1,14 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3cd lua-term
4luarocks config variables.CFLAGS " $CFLAGS"
5luarocks make --pack-binary-rock lua-term-0.8-1.rockspec
6obj="lua-term-0.8-1.$(luarocks config arch).rock"
7cp $obj /root
8cd /root
9if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
10 # And pack the library with upx
11 unzip $obj lib/*
12 upx --no-progress lib/term/*
13 zip -r "$obj" lib
14fi
diff --git a/meta.lua b/meta.lua
index 9c604d0..a98acf7 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,6 +1,43 @@
1return { 1local lua_versions = {
2 ["lua-term"] = { 2 ["51"] = true,
3 requires = {}, 3 ["52"] = true,
4 produces = {}, 4 ["53"] = true,
5 } 5 ["54"] = true,
6}
7local optimizations = {
8 tiny = "-Oz",
9 size = "-Os",
10 zero = "-O0",
11 one = "-O1",
12 two = "-O2",
13 three = "-O3",
14 debug = "-Og"
6} 15}
16local debug = {
17 release = "",
18 debug = "-g",
19}
20local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
21
22local builds = {}
23for version, _, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
24 local buildname = "lua-term-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
25 builds[buildname] = {
26 image = "image-luarocks-" .. version.. "-" .. image,
27 requires = {
28 {"git", "lua-term"},
29 {"cicd","image-luarocks-" .. version .. "-" .. image},
30 {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"},
31 },
32 produces = {
33 ["lua-term-0.8-1.mingw32-x86_64.rock"] = {"luarocks.sh", "lua-term", image, version, name, rel},
34 },
35 env = {
36 CFLAGS = optimization .. " " .. flag,
37 rockver = version:gsub("(%d)(%d)$","%1.%2"),
38 version = version
39 },
40 }
41end
42
43return builds