diff options
| -rwxr-xr-x | bit32 | 18 | ||||
| -rwxr-xr-x | init | 20 | ||||
| -rw-r--r-- | meta.lua | 35 |
3 files changed, 50 insertions, 23 deletions
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/bin/sh -ex | ||
| 2 | |||
| 3 | cd lua-compat-5.3 | ||
| 4 | cp rockspecs/bit32-scm-1.rockspec . | ||
| 5 | luarocks config variables.CFLAGS " $CFLAGS" | ||
| 6 | luarocks make --pack-binary-rock bit32-scm-1.rockspec | ||
| 7 | obj="bit32-scm-1.$(luarocks config arch).rock" | ||
| 8 | cp $obj /root | ||
| 9 | cd /root | ||
| 10 | if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then | ||
| 11 | # Release build, delete docs/ and tests/ | ||
| 12 | zip -d $obj doc/ doc/* | ||
| 13 | # And pack the library with upx | ||
| 14 | unzip $obj lib/* | ||
| 15 | upx --no-progress lib/* | ||
| 16 | zip -r "$obj" lib | ||
| 17 | rm -rf lib | ||
| 18 | fi | ||
| @@ -2,27 +2,17 @@ | |||
| 2 | 2 | ||
| 3 | cd lua-compat-5.3 | 3 | cd lua-compat-5.3 |
| 4 | cp rockspecs/compat53-$packver.rockspec . | 4 | cp rockspecs/compat53-$packver.rockspec . |
| 5 | cp rockspecs/bit32-$packver.rockspec . | ||
| 6 | luarocks config variables.CFLAGS " $CFLAGS" | 5 | luarocks config variables.CFLAGS " $CFLAGS" |
| 7 | luarocks make --pack-binary-rock compat53-$packver.rockspec | 6 | luarocks make --pack-binary-rock compat53-$packver.rockspec |
| 8 | luarocks make --pack-binary-rock bit32-$packver.rockspec | 7 | obj="compat53-$packver.$(luarocks config arch).rock" |
| 9 | obj1="compat53-$packver.$(luarocks config arch).rock" | 8 | cp $obj /root |
| 10 | obj2="bit32-$packver.$(luarocks config arch).rock" | ||
| 11 | cp $obj1 /root | ||
| 12 | cp $obj2 /root | ||
| 13 | cd /root | 9 | cd /root |
| 14 | if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then | 10 | if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then |
| 15 | # Release build, delete docs/ and tests/ | 11 | # Release build, delete docs/ and tests/ |
| 16 | zip -d $obj1 doc/ doc/* | 12 | zip -d $obj doc/ doc/* |
| 17 | zip -d $obj2 doc/ doc/* | ||
| 18 | # And pack the library with upx | 13 | # And pack the library with upx |
| 19 | unzip $obj1 lib/* | 14 | unzip $obj lib/* |
| 20 | upx --no-progress lib/compat53/* | 15 | upx --no-progress lib/compat53/* |
| 21 | zip -r "$obj1" lib | 16 | zip -r "$obj" lib |
| 22 | rm -rf lib | ||
| 23 | |||
| 24 | unzip $obj2 lib/* | ||
| 25 | upx --no-progress lib/* | ||
| 26 | zip -r "$obj2" lib | ||
| 27 | rm -rf lib | 17 | rm -rf lib |
| 28 | fi | 18 | fi |
| @@ -1,4 +1,4 @@ | |||
| 1 | local package_versions = { | 1 | local compat_versions = { |
| 2 | ["scm-1"] = true, | 2 | ["scm-1"] = true, |
| 3 | ["0.12-1"] = true | 3 | ["0.12-1"] = true |
| 4 | } | 4 | } |
| @@ -24,22 +24,41 @@ local debug = { | |||
| 24 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} | 24 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} |
| 25 | 25 | ||
| 26 | local builds = {} | 26 | local builds = {} |
| 27 | for package_version, _, version, _, name, optimization, rel, flag, _, image in cartesian(package_versions, lua_versions, optimizations, debug, compilers) do | 27 | for version, _, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do |
| 28 | local buildname = "lua-compat-53-".. package_version:gsub("[%W]","-") .. "-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image | 28 | for package_version,_ in pairs(compat_versions) do |
| 29 | builds[buildname] = { | 29 | local buildname = "lua-compat-53-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image |
| 30 | image = "image-luarocks-" .. version.. "-" .. image, | 30 | builds[buildname] = { |
| 31 | image = "image-luarocks-" .. version.. "-" .. image, | ||
| 32 | requires = { | ||
| 33 | {"git", "lua-compat-5.3"}, | ||
| 34 | {"cicd","image-luarocks-" .. version .. "-" .. image}, | ||
| 35 | {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, | ||
| 36 | }, | ||
| 37 | produces = { | ||
| 38 | ["compat53-" .. package_version .. ".mingw32-x86_64.rock"] = {"luarocks.sh", "compat53", image, version, name, rel}, | ||
| 39 | }, | ||
| 40 | env = { | ||
| 41 | CFLAGS = optimization .. " " .. flag, | ||
| 42 | packver = package_version, | ||
| 43 | rockver = version:gsub("(%d)(%d)$","%1.%2"), | ||
| 44 | version = version | ||
| 45 | }, | ||
| 46 | } | ||
| 47 | end | ||
| 48 | local buildname2 = "lua-bit32-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image | ||
| 49 | builds[buildname2] = { | ||
| 50 | image = "image-luarocks-" .. version .. "-" .. image, | ||
| 51 | entrypoint="bit32", | ||
| 31 | requires = { | 52 | requires = { |
| 32 | {"git", "lua-compat-5.3"}, | 53 | {"git", "lua-compat-5.3"}, |
| 33 | {"cicd","image-luarocks-" .. version .. "-" .. image}, | 54 | {"cicd","image-luarocks-" .. version .. "-" .. image}, |
| 34 | {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, | 55 | {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, |
| 35 | }, | 56 | }, |
| 36 | produces = { | 57 | produces = { |
| 37 | ["compat53-" .. package_version .. ".mingw32-x86_64.rock"] = {"luarocks.sh", "compat53", image, version, name, rel}, | 58 | ["bit32-scm-1.mingw32-x86_64.rock"] = {"luarocks.sh", "bit32", image, version, name, rel}, |
| 38 | ["bit32-" .. package_version .. ".mingw32-x86_64.rock"] = {"luarocks.sh", "bit32", image, version, name, rel}, | ||
| 39 | }, | 59 | }, |
| 40 | env = { | 60 | env = { |
| 41 | CFLAGS = optimization .. " " .. flag, | 61 | CFLAGS = optimization .. " " .. flag, |
| 42 | packver = package_version, | ||
| 43 | rockver = version:gsub("(%d)(%d)$","%1.%2"), | 62 | rockver = version:gsub("(%d)(%d)$","%1.%2"), |
| 44 | version = version | 63 | version = version |
| 45 | }, | 64 | }, |
