summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-08-05 18:40:46 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-08-05 18:40:46 -0500
commitf709bc88f3fda4f1669f5d455ece2eaba293ede0 (patch)
tree5b4d7e95d173c4768a71be7d2897bebb53144473
parent12b392ede21914c51e85e5d10106347ae5d15a25 (diff)
downloadluafilesystem-packaging-f709bc88f3fda4f1669f5d455ece2eaba293ede0.tar.gz
luafilesystem-packaging-f709bc88f3fda4f1669f5d455ece2eaba293ede0.tar.bz2
luafilesystem-packaging-f709bc88f3fda4f1669f5d455ece2eaba293ede0.zip
Start working on filesystem
-rwxr-xr-xinit2
-rw-r--r--meta.lua60
-rw-r--r--prepare9
3 files changed, 65 insertions, 6 deletions
diff --git a/init b/init
index 250276c..642d265 100755
--- a/init
+++ b/init
@@ -1 +1 @@
#!/bin/bash -ex #!/bin/sh -ex
diff --git a/meta.lua b/meta.lua
index 705152e..49bcc29 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,7 +1,57 @@
1return { 1local lua_versions = {
2 { 2 ["51"] = "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
3 name = "##NAME##", 3 --[[
4 requires = {}, 4 ["52"] = "https://www.lua.org/ftp/lua-5.2.4.tar.gz",
5 ["53"] = "https://www.lua.org/ftp/lua-5.3.6.tar.gz",
6 ["54"] = "https://www.lua.org/ftp/lua-5.4.7.tar.gz",
7 ]]
8}
9local optimizations = {
10 --[[
11 size = "-Os",
12 zero = "-O0",
13 one = "-O1",
14 two = "-O2",
15 ]]
16 three = "-O3",
17}
18local debug = {
19 --[[
20 release = "",
21 ]]
22 debug = "-g",
23}
24local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
25
26local builds = {}
27for _,image,lua_ver,link in cartesian(compilers,lua_versions) do
28 builds["image-luafilesystem-" .. image .. "-lua" .. lua_ver] = {
29 image = "image-luafilesystem" .. image .. "-lua" .. lua_ver,
30 requires = {
31 {"http",link}
32 },
5 produces = {}, 33 produces = {},
34 export = true,
35 entrypoint = "prepare",
36 env = {
37 rockver = lua_ver:gsub("(%d)(%d)$","%1.%2")
38 }
6 } 39 }
7} 40end
41for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
42 local name = "lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
43 builds[name] = {
44 image = "image-luafilesystem-" .. image .. "-lua" .. lua_ver,
45 requires = {
46 {"git", "luafilesystem"},
47 {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image},
48 },
49 produces = {
50 "luafilesystem-git-1.win32-" .. image .. ".rock"
51 },
52 env = {
53 CFLAGS = optimization .. " " .. flag,
54 rockver = lua_ver:gsub("(%d)(%d)$","%1.%2")
55 },
56 }
57end
diff --git a/prepare b/prepare
new file mode 100644
index 0000000..73e85b6
--- /dev/null
+++ b/prepare
@@ -0,0 +1,9 @@
1#!/bin/sh -ex
2
3apk add luarocks$rocks_ver
4luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..")
5mkdir "$luaver"
6tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1
7rm "/root/$luaver/src/*.c"
8luarocks-$rocks_ver config variables.LUA_INCDIR "/root/$luaver/src"
9luarocks-$rocks_ver config variables.CFLAGS "$CFLAGS"