summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-12-09 00:00:36 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-12-09 00:00:36 -0600
commit4d311dd0ea315d09154cae4d4212f6b14e3ae211 (patch)
treef97b0bcfd27b9940d8842ba904a427f8d0b9f716
parentd42f7ceae0825a1b66b33dd10ee371fde230b59b (diff)
downloadluasystem-packaging-4d311dd0ea315d09154cae4d4212f6b14e3ae211.tar.gz
luasystem-packaging-4d311dd0ea315d09154cae4d4212f6b14e3ae211.tar.bz2
luasystem-packaging-4d311dd0ea315d09154cae4d4212f6b14e3ae211.zip
Inital stab at packaging
-rwxr-xr-xinit14
-rw-r--r--meta.lua54
2 files changed, 63 insertions, 5 deletions
diff --git a/init b/init
index 642d265..af3559d 100755
--- a/init
+++ b/init
@@ -1 +1,15 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3cd luasystem
4mv rockspecs/* .
5luarocks config variables.CFLAGS " $CFLAGS"
6luarocks make --pack-binary-rock luasystem-$packver.rockspec
7obj="luasystem-$packver.$(luarocks config arch).rock"
8cp $obj /root
9cd /root
10if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
11 # And pack the library with upx
12 unzip $obj lib/*
13 upx --no-progress lib/*
14 zip -r "$obj" lib
15fi
diff --git a/meta.lua b/meta.lua
index 3685210..497d70b 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,6 +1,50 @@
1return { 1local lua_versions = {
2 ["luasystem"] = { 2 ["51"] = true,
3 requires = {}, 3 ["52"] = true,
4 produces = {}, 4 ["53"] = true,
5 } 5 ["54"] = true,
6} 6}
7local package_versions = {
8 ["0.4.4-1"] = true,
9 ["scm-0"] = true
10}
11local optimizations = {
12 tiny = "-Oz",
13 size = "-Os",
14 zero = "-O0",
15 one = "-O1",
16 two = "-O2",
17 three = "-O3",
18 debug = "-Og"
19}
20local debug = {
21 release = "",
22 debug = "-g",
23}
24local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
25
26local builds = {}
27for version, _, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
28 for package_version, _ in pairs(package_versions) do
29 local buildname = "luasystem-" .. package_version:gsub("[%W]","-") .. "-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
30 builds[buildname] = {
31 image = "image-luarocks-" .. version.. "-" .. image,
32 requires = {
33 {"git", "luasystem"},
34 {"cicd","image-luarocks-" .. version .. "-" .. image},
35 {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"},
36 },
37 produces = {
38 ["luasystem-" .. package_version .. ".mingw32-x86_64.rock"] = {"luarocks.sh", "luasystem", image, version, name, rel},
39 },
40 env = {
41 CFLAGS = optimization .. " " .. flag,
42 rockver = version:gsub("(%d)(%d)$","%1.%2"),
43 version = version,
44 packver = package_version,
45 },
46 }
47 end
48end
49
50return builds