diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-08-13 16:19:14 -0500 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-08-13 16:19:14 -0500 |
| commit | e4f4ce98515f4c47a194061df29cb9087b561caf (patch) | |
| tree | ae3088f450de3853bbee9448bb87a9c8921b5bb2 | |
| parent | b47e7d622e0017a6bfbd5e74d99bf4407c1a003f (diff) | |
| download | image-luarocks-e4f4ce98515f4c47a194061df29cb9087b561caf.tar.gz image-luarocks-e4f4ce98515f4c47a194061df29cb9087b561caf.tar.bz2 image-luarocks-e4f4ce98515f4c47a194061df29cb9087b561caf.zip | |
Generate some luarocks images
| -rwxr-xr-x | init | 18 | ||||
| -rw-r--r-- | meta.lua | 41 |
2 files changed, 54 insertions, 5 deletions
| @@ -1 +1,19 @@ | |||
| 1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
| 2 | |||
| 3 | rc-service networking start | ||
| 4 | |||
| 5 | apk add luarocks$maj.$min zip | ||
| 6 | ln -s /usr/bin/luarocks-$maj.$min /usr/local/bin/luarocks | ||
| 7 | ln -s /root/lua$maj$min.dll /root/liblua.dll | ||
| 8 | |||
| 9 | luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") | ||
| 10 | mkdir "$luaver" | ||
| 11 | tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 | ||
| 12 | rm /root/$luaver/src/*.c | ||
| 13 | rm -rf /root/$luaver/doc | ||
| 14 | rm -rf /root/$luaver/test | ||
| 15 | rm -rf /root/$luaver/etc | ||
| 16 | rm /root/*.tar.gz | ||
| 17 | rm -rf /root/image-mingw64 | ||
| 18 | luarocks config arch $arch | ||
| 19 | luarocks config link_lua_explicitly true | ||
| @@ -1,6 +1,37 @@ | |||
| 1 | return { | 1 | |
| 2 | ["image-luarocks"] = { | 2 | local 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 | } |
| 10 | local sources = { | ||
| 11 | --mingw32 = "mingw32-x86", | ||
| 12 | mignw64 = "mingw32-x86_64", | ||
| 13 | --"clang32", | ||
| 14 | --"claing64" | ||
| 15 | } | ||
| 16 | |||
| 17 | local builds = {} | ||
| 18 | |||
| 19 | for 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 | } | ||
| 34 | end | ||
| 35 | |||
| 36 | |||
| 37 | return builds | ||
