diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-12-18 22:47:15 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-12-18 22:47:15 -0600 |
commit | fc8e2ecf9fe88295494e539728796f13dda67897 (patch) | |
tree | 4aa626770fb8f56af469482978aa8e68f2296d40 | |
parent | 4ec8388bdbdca3da82d06384b79acdde140cdafe (diff) | |
download | luaossl-packaging-fc8e2ecf9fe88295494e539728796f13dda67897.tar.gz luaossl-packaging-fc8e2ecf9fe88295494e539728796f13dda67897.tar.bz2 luaossl-packaging-fc8e2ecf9fe88295494e539728796f13dda67897.zip |
Inital commit
-rwxr-xr-x | init | 14 | ||||
-rw-r--r-- | meta.lua | 48 |
2 files changed, 57 insertions, 5 deletions
@@ -1 +1,15 @@ | |||
1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
2 | |||
3 | cp luaossl-packaging/luaossl-git.rockspec luaossl | ||
4 | cd luaossl | ||
5 | luarocks config variables.CFLAGS " $CFLAGS" | ||
6 | luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec | ||
7 | obj="luaossl-git.$(luarocks config arch).rock" | ||
8 | cp $obj /root | ||
9 | cd /root | ||
10 | if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then | ||
11 | # And pack the library with upx | ||
12 | unzip $obj lib/* | ||
13 | upx --no-progress lib/* | ||
14 | zip -r "$obj" lib | ||
15 | fi | ||
@@ -1,6 +1,44 @@ | |||
1 | return { | 1 | local lua_versions = { |
2 | ["luaossl"] = { | 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 = "luaossl-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image | ||
25 | builds[buildname] = { | ||
26 | image = "image-luarocks-" .. version.. "-" .. image, | ||
27 | requires = { | ||
28 | {"git", "luaossl"}, | ||
29 | {"cicd","image-luarocks-" .. version .. "-" .. image}, | ||
30 | {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, | ||
31 | }, | ||
32 | produces = { | ||
33 | ["luaossl-git.mingw32-x86_64.rock"] = {"luarocks.sh", "luaossl", 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 | break | ||
42 | end | ||
43 | |||
44 | return builds | ||