summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-08-13 16:48:51 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-08-13 16:48:51 -0500
commit249ee384da87b747496820627ccee24fb505862d (patch)
tree8b3b7492715750ffc054dd3301a3cc0608ca2fb8
parent38f670d89ca5038c1d552bc574d5fe4e129ea47b (diff)
downloadluafilesystem-packaging-249ee384da87b747496820627ccee24fb505862d.tar.gz
luafilesystem-packaging-249ee384da87b747496820627ccee24fb505862d.tar.bz2
luafilesystem-packaging-249ee384da87b747496820627ccee24fb505862d.zip
Use luarocks image
-rwxr-xr-xinit5
-rw-r--r--meta.lua27
-rwxr-xr-xprepare17
3 files changed, 12 insertions, 37 deletions
diff --git a/init b/init
index 642d265..87b093a 100755
--- a/init
+++ b/init
@@ -1 +1,6 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3cd luafilesystem
4luarocks config variables.CFLAGS "$CFLAGS"
5luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec
6cp luafilesystem-scm-1.mingw32-x86_64.rock /root
diff --git a/meta.lua b/meta.lua
index 218ee05..7234147 100644
--- a/meta.lua
+++ b/meta.lua
@@ -24,34 +24,21 @@ local debug = {
24local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} 24local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
25 25
26local builds = {} 26local builds = {}
27for _,image,lua_ver,link in cartesian(compilers,lua_versions) do
28 builds["image-luafilesystem-" .. image .. "-lua" .. lua_ver] = {
29 image = "image-" .. image,
30 requires = {
31 {"http",link}
32 },
33 produces = {},
34 export = true,
35 entrypoint = "prepare",
36 env = {
37 rockver = lua_ver:gsub("(%d)(%d)$","%1.%2")
38 }
39 }
40end
41for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do 27for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
42 local name = "luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image 28 builds["luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image] = {
43 builds[name] = { 29 image = "image-luarocks-" .. version.. "-" .. image,
44 image = "image-luafilesystem-" .. image .. "-lua" .. version,
45 requires = { 30 requires = {
46 {"git", "luafilesystem"}, 31 {"git", "luafilesystem"},
47 {"cicd","image-luafilesystem-" .. image .. "-lua" .. version}, 32 {"cicd","image-luarocks-" .. version .. "-" .. image},
33 {"cicd","lua" .. version .. "-" .. optimization .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}
48 }, 34 },
49 produces = { 35 produces = {
50 "luafilesystem-git-1.win32-" .. image .. ".rock" 36 "luafilesystem-scm-1.mingw32-x86_64.rock"
51 }, 37 },
52 env = { 38 env = {
53 CFLAGS = optimization .. " " .. flag, 39 CFLAGS = optimization .. " " .. flag,
54 rockver = version:gsub("(%d)(%d)$","%1.%2") 40 rockver = version:gsub("(%d)(%d)$","%1.%2"),
41 version = version
55 }, 42 },
56 } 43 }
57end 44end
diff --git a/prepare b/prepare
deleted file mode 100755
index f669f86..0000000
--- a/prepare
+++ /dev/null
@@ -1,17 +0,0 @@
1#!/bin/sh -ex
2
3rc-service networking start
4
5apk add luarocks$rockver
6luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..")
7mkdir "$luaver"
8tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1
9rm /root/$luaver/src/*.c
10rm -rf /root/$luaver/doc
11rm -rf /root/$luaver/test
12rm -rf /root/$luaver/etc
13rm /root/*.tar.gz
14rm -rf /root/image-mingw64
15rm -rf /root/luafilesystem-packaging
16luarocks-$rockver config variables.LUA_INCDIR "/root/$luaver/src"
17luarocks-$rockver config variables.CFLAGS "$CFLAGS"