summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-08-13 16:19:14 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-08-13 16:19:14 -0500
commite4f4ce98515f4c47a194061df29cb9087b561caf (patch)
treeae3088f450de3853bbee9448bb87a9c8921b5bb2
parentb47e7d622e0017a6bfbd5e74d99bf4407c1a003f (diff)
downloadimage-luarocks-e4f4ce98515f4c47a194061df29cb9087b561caf.tar.gz
image-luarocks-e4f4ce98515f4c47a194061df29cb9087b561caf.tar.bz2
image-luarocks-e4f4ce98515f4c47a194061df29cb9087b561caf.zip
Generate some luarocks images
-rwxr-xr-xinit18
-rw-r--r--meta.lua41
2 files changed, 54 insertions, 5 deletions
diff --git a/init b/init
index 642d265..451c299 100755
--- a/init
+++ b/init
@@ -1 +1,19 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3rc-service networking start
4
5apk add luarocks$maj.$min zip
6ln -s /usr/bin/luarocks-$maj.$min /usr/local/bin/luarocks
7ln -s /root/lua$maj$min.dll /root/liblua.dll
8
9luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..")
10mkdir "$luaver"
11tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1
12rm /root/$luaver/src/*.c
13rm -rf /root/$luaver/doc
14rm -rf /root/$luaver/test
15rm -rf /root/$luaver/etc
16rm /root/*.tar.gz
17rm -rf /root/image-mingw64
18luarocks config arch $arch
19luarocks config link_lua_explicitly true
diff --git a/meta.lua b/meta.lua
index 65e58da..a950f7e 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,6 +1,37 @@
1return { 1
2 ["image-luarocks"] = { 2local lua_versions = {
3 requires = {}, 3 ["51"] = "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
4 produces = {}, 4 --[[
5 } 5 ["52"] = "https://www.lua.org/ftp/lua-5.2.4.tar.gz",
6 ["53"] = "https://www.lua.org/ftp/lua-5.3.6.tar.gz",
7 ["54"] = "https://www.lua.org/ftp/lua-5.4.7.tar.gz",
8 ]]
6} 9}
10local sources = {
11 --mingw32 = "mingw32-x86",
12 mignw64 = "mingw32-x86_64",
13 --"clang32",
14 --"claing64"
15}
16
17local builds = {}
18
19for image, arch, version, link in cartesian(sources, lua_versions) do
20 builds["image-luarocks-" .. version.. "-" .. image] = {
21 image = "image-" .. image,
22 requires = {
23 {"http", link}
24
25 },
26 produces = {},
27 export = true,
28 env = {
29 maj = version:match("(%d)%d"),
30 min = version:match("%d(%d)"),
31 arch = arch
32 }
33 }
34end
35
36
37return builds