diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-12-09 02:19:51 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-12-09 02:19:51 -0600 |
commit | d665ff9226d474a3c7a59deb00406ded4de6e1fe (patch) | |
tree | f662d6b9218d3027fed05d8fb17c1f7eeca82c12 | |
parent | a7ed88210908c664fafdbbf2d85212462db153e7 (diff) | |
download | lua-term-packaging-master.tar.gz lua-term-packaging-master.tar.bz2 lua-term-packaging-master.zip |
-rwxr-xr-x | init | 13 | ||||
-rw-r--r-- | meta.lua | 47 |
2 files changed, 55 insertions, 5 deletions
@@ -1 +1,14 @@ | |||
1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
2 | |||
3 | cd lua-term | ||
4 | luarocks config variables.CFLAGS " $CFLAGS" | ||
5 | luarocks make --pack-binary-rock lua-term-0.8-1.rockspec | ||
6 | obj="lua-term-0.8-1.$(luarocks config arch).rock" | ||
7 | cp $obj /root | ||
8 | cd /root | ||
9 | if [ -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 | ||
14 | fi | ||
@@ -1,6 +1,43 @@ | |||
1 | return { | 1 | local lua_versions = { |
2 | ["lua-term"] = { | 2 | ["51"] = true, |
3 | requires = {}, | 3 | ["52"] = true, |
4 | produces = {}, | 4 | ["53"] = true, |
5 | } | 5 | ["54"] = true, |
6 | } | ||
7 | local optimizations = { | ||
8 | tiny = "-Oz", | ||
9 | size = "-Os", | ||
10 | zero = "-O0", | ||
11 | one = "-O1", | ||
12 | two = "-O2", | ||
13 | three = "-O3", | ||
14 | debug = "-Og" | ||
6 | } | 15 | } |
16 | local debug = { | ||
17 | release = "", | ||
18 | debug = "-g", | ||
19 | } | ||
20 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} | ||
21 | |||
22 | local builds = {} | ||
23 | for 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 | } | ||
41 | end | ||
42 | |||
43 | return builds | ||