#!/bin/sh -ex rc-service networking start apk add luarocks$maj.$min zip ln -s /usr/bin/luarocks-$maj.$min /usr/local/bin/luarocks # We can create the link, even if the file doesn't exist yet. When gcc links # it'll use the filename built into the binary, not the name of the link so # this is fine. ln -s /root/lua$maj$min.dll /root/liblua.dll luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") mkdir "$luaver" tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 rm /root/$luaver/src/*.c rm -rf /root/$luaver/doc rm -rf /root/$luaver/test rm -rf /root/$luaver/etc rm /root/*.tar.gz rm -rf /root/image-mingw64 luarocks config arch $arch luarocks config link_lua_explicitly true luarocks config variables.LUA_INCDIR /root/$luaver/src # Downstream is responsible for selecting the lua51.dll, whatever it's compiled for luarocks config variables.LUA_LIBDIR /root # Luarocks checks for liblua.so and liblua.a but gcc looks for liblua.dll luarocks config variables.LUA_LIBDIR_OK true #sets it as a string sed -i 's/LUA_LIBDIR_OK = "true"/LUA_LIBDIR_OK = true/g' /etc/luarocks/config-$luaver.lua