diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-08-13 16:48:51 -0500 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-08-13 16:48:51 -0500 |
commit | 249ee384da87b747496820627ccee24fb505862d (patch) | |
tree | 8b3b7492715750ffc054dd3301a3cc0608ca2fb8 | |
parent | 38f670d89ca5038c1d552bc574d5fe4e129ea47b (diff) | |
download | luafilesystem-packaging-249ee384da87b747496820627ccee24fb505862d.tar.gz luafilesystem-packaging-249ee384da87b747496820627ccee24fb505862d.tar.bz2 luafilesystem-packaging-249ee384da87b747496820627ccee24fb505862d.zip |
Use luarocks image
-rwxr-xr-x | init | 5 | ||||
-rw-r--r-- | meta.lua | 27 | ||||
-rwxr-xr-x | prepare | 17 |
3 files changed, 12 insertions, 37 deletions
@@ -1 +1,6 @@ | |||
1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
2 | |||
3 | cd luafilesystem | ||
4 | luarocks config variables.CFLAGS "$CFLAGS" | ||
5 | luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec | ||
6 | cp luafilesystem-scm-1.mingw32-x86_64.rock /root | ||
@@ -24,34 +24,21 @@ local debug = { | |||
24 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} | 24 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} |
25 | 25 | ||
26 | local builds = {} | 26 | local builds = {} |
27 | for _,image,lua_ver,link in cartesian(compilers,lua_versions) do | ||
28 | builds["image-luafilesystem-" .. image .. "-lua" .. lua_ver] = { | ||
29 | image = "image-" .. image, | ||
30 | requires = { | ||
31 | {"http",link} | ||
32 | }, | ||
33 | produces = {}, | ||
34 | export = true, | ||
35 | entrypoint = "prepare", | ||
36 | env = { | ||
37 | rockver = lua_ver:gsub("(%d)(%d)$","%1.%2") | ||
38 | } | ||
39 | } | ||
40 | end | ||
41 | for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do | 27 | for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do |
42 | local name = "luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image | 28 | builds["luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image] = { |
43 | builds[name] = { | 29 | image = "image-luarocks-" .. version.. "-" .. image, |
44 | image = "image-luafilesystem-" .. image .. "-lua" .. version, | ||
45 | requires = { | 30 | requires = { |
46 | {"git", "luafilesystem"}, | 31 | {"git", "luafilesystem"}, |
47 | {"cicd","image-luafilesystem-" .. image .. "-lua" .. version}, | 32 | {"cicd","image-luarocks-" .. version .. "-" .. image}, |
33 | {"cicd","lua" .. version .. "-" .. optimization .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"} | ||
48 | }, | 34 | }, |
49 | produces = { | 35 | produces = { |
50 | "luafilesystem-git-1.win32-" .. image .. ".rock" | 36 | "luafilesystem-scm-1.mingw32-x86_64.rock" |
51 | }, | 37 | }, |
52 | env = { | 38 | env = { |
53 | CFLAGS = optimization .. " " .. flag, | 39 | CFLAGS = optimization .. " " .. flag, |
54 | rockver = version:gsub("(%d)(%d)$","%1.%2") | 40 | rockver = version:gsub("(%d)(%d)$","%1.%2"), |
41 | version = version | ||
55 | }, | 42 | }, |
56 | } | 43 | } |
57 | end | 44 | end |
diff --git a/prepare b/prepare deleted file mode 100755 index f669f86..0000000 --- a/prepare +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #!/bin/sh -ex | ||
2 | |||
3 | rc-service networking start | ||
4 | |||
5 | apk add luarocks$rockver | ||
6 | luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") | ||
7 | mkdir "$luaver" | ||
8 | tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 | ||
9 | rm /root/$luaver/src/*.c | ||
10 | rm -rf /root/$luaver/doc | ||
11 | rm -rf /root/$luaver/test | ||
12 | rm -rf /root/$luaver/etc | ||
13 | rm /root/*.tar.gz | ||
14 | rm -rf /root/image-mingw64 | ||
15 | rm -rf /root/luafilesystem-packaging | ||
16 | luarocks-$rockver config variables.LUA_INCDIR "/root/$luaver/src" | ||
17 | luarocks-$rockver config variables.CFLAGS "$CFLAGS" | ||