From f5c356b5f4611eaad8a518a807b7da2b6fcb0b33 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Mon, 9 Dec 2024 02:04:48 -0600 Subject: Fix system build No easy way but to rewrite rockspecs Also delete the doc/ folder in release builds. --- init | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'init') diff --git a/init b/init index af3559d..cc8d540 100755 --- a/init +++ b/init @@ -3,11 +3,16 @@ cd luasystem mv rockspecs/* . luarocks config variables.CFLAGS " $CFLAGS" -luarocks make --pack-binary-rock luasystem-$packver.rockspec +#No easy way to fool luarocks into building win32 instead of linux platform-specific stuff +sed -i "s/linux/foobar/g" *.rockspec +sed -i "s/win32/linux/g" *.rockspec +luarocks make --pack-binary-rock luasystem-$packver.rockspec --verbose obj="luasystem-$packver.$(luarocks config arch).rock" cp $obj /root cd /root if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then + # Release build, delete docs/ + zip -d $obj doc/ doc/* # And pack the library with upx unzip $obj lib/* upx --no-progress lib/* -- cgit v1.2.3-55-g6feb