diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-11-22 17:41:20 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-11-22 17:41:20 -0600 |
| commit | edf05590e666ca35a3a512aa49e26e9eae153ece (patch) | |
| tree | 68707c5122b891bd141c1b745ec73af4098bd783 /init | |
| parent | 5282a90383bec06b6c276c03c767de42d6a6b87d (diff) | |
| download | lua-compat-53-packaging-edf05590e666ca35a3a512aa49e26e9eae153ece.tar.gz lua-compat-53-packaging-edf05590e666ca35a3a512aa49e26e9eae153ece.tar.bz2 lua-compat-53-packaging-edf05590e666ca35a3a512aa49e26e9eae153ece.zip | |
Break bit32 into it's own build target.
Diffstat (limited to 'init')
| -rwxr-xr-x | init | 20 |
1 files changed, 5 insertions, 15 deletions
| @@ -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 |
