summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-07-29 16:32:59 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-07-29 16:32:59 -0500
commitae3e8e4331852dc89479fba5c5175721bd27c20e (patch)
tree3039c85923db508e4caea8f7211ce2f4eae09abc
parentc9180644003e24bc979f2194abd0c5353d58b766 (diff)
downloadlua-packaging-ae3e8e4331852dc89479fba5c5175721bd27c20e.tar.gz
lua-packaging-ae3e8e4331852dc89479fba5c5175721bd27c20e.tar.bz2
lua-packaging-ae3e8e4331852dc89479fba5c5175721bd27c20e.zip
Start working on builds
-rwxr-xr-xinit10
-rw-r--r--meta.lua49
2 files changed, 50 insertions, 9 deletions
diff --git a/init b/init
index 30ad5d0..d9c208f 100755
--- a/init
+++ b/init
@@ -1,2 +1,10 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2ls -lah 2
3luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..")
4mkdir "$luaver"
5tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1
6cd "$luaver"
7make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $1 $2"
8cd "/root/"
9cp "$luaver/src/*.exe" .
10cp "$luaver/src/*.dll" .
diff --git a/meta.lua b/meta.lua
index 6fd3d9b..7ac570f 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,11 +1,44 @@
1local lua_versions = {"5.1","5.2","5.3","5.4"} 1local lua_versions = {
2 ["51"] = "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
3 --[[
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 size = "-Os",
11 --[[
12 zero = "-O0",
13 one = "-O1",
14 two = "-O2",
15 three = "-O3",
16 ]]
17}
18local debug = {
19 release = "",
20 --[[
21 debug = "-g",
22 ]]
23}
24local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
25-- We can't actually use the git version from github, it's missing luac.c, which is needed to build the luac executable.
26-- Even though early makefiles, and later `onelua.c` files suggest it should exist.
2 27
3return { 28local builds = {}
4 { 29for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
5 name = "lua51", 30 table.insert(builds,{
31 image = "image-" .. compilers,
32 name = "lua" .. version .. optimization .. "-" .. rel .. "-" .. name .. "-" .. image,
6 requires = { 33 requires = {
7 {"git","lua#v5.1"}, 34 {"http", link},
8 }, 35 },
9 produces = {}, 36 produces = {
10 } 37 "lua.exe",
11} 38 "lua" .. version .. ".dll",
39 "luac.exe",
40 },
41 entrypoint = "init " .. rel .. " " .. flag,
42 })
43end
44return builds