diff options
| -rw-r--r-- | hardcoded.lua | 3 | ||||
| -rwxr-xr-x | init | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/hardcoded.lua b/hardcoded.lua index 9be83d8..d51d3c0 100644 --- a/hardcoded.lua +++ b/hardcoded.lua | |||
| @@ -3,4 +3,7 @@ return { | |||
| 3 | PROCESSOR = "x86", | 3 | PROCESSOR = "x86", |
| 4 | FORCE_CONFIG = true, | 4 | FORCE_CONFIG = true, |
| 5 | IS_BINARY = true, | 5 | IS_BINARY = true, |
| 6 | SYSCONFDIR = "/config", | ||
| 7 | PREFIX = "/tree", | ||
| 8 | WIN_TOOLS = "/tools" | ||
| 6 | } | 9 | } |
| @@ -8,11 +8,13 @@ tar -xvzf lua-*.tar.gz --directory="lua" --strip-components=1 | |||
| 8 | mv luarocks-packaging/hardcoded.lua luarocks/src/luarocks/core/hardcoded.lua | 8 | mv luarocks-packaging/hardcoded.lua luarocks/src/luarocks/core/hardcoded.lua |
| 9 | cd luarocks | 9 | cd luarocks |
| 10 | mkdir build-binary | 10 | mkdir build-binary |
| 11 | sed -i 's/local program_version = "dev"/local program_version = "lua4.win"/g' /root/luarocks/src/luarocks/core/cfg.lua | ||
| 11 | patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one | 12 | patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one |
| 12 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one | 13 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one |
| 13 | patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c | 14 | patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c |
| 14 | cat build-binary/luarocks.exe.c | wc -l | 15 | cat build-binary/luarocks.exe.c | wc -l |
| 15 | gcc -o build-binary/luarocks.exe -Oz build-binary/luarocks.exe.c -I/root/lua/src /root/libbz2.a /root/libssl.a /root/libz.a /root/liblua.a -mconsole -mwindows -lm | 16 | gcc -o build-binary/luarocks.exe -Oz build-binary/luarocks.exe.c -I/root/lua/src /root/libbz2.a /root/libssl.a /root/libz.a /root/liblua.a -mconsole -mwindows -lm |
| 17 | # For some reason we have to do this twice to actually compile in all the modules | ||
| 16 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one | 18 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one |
| 17 | patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c | 19 | patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c |
| 18 | cat build-binary/luarocks.exe.c | wc -l | 20 | cat build-binary/luarocks.exe.c | wc -l |
