blob: df9b9834e4cf9deb95fe217db13546695895741a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh -ex
cp lpeg-packaging/*.rockspec lpeg
cd lpeg
luarocks config variables.CFLAGS " $CFLAGS"
luarocks make --pack-binary-rock lpeg-1.1.0-2.rockspec
obj="lpeg-1.1.0-2.$(luarocks config arch).rock"
cp $obj /root
cd /root
if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
# Release build, delete docs/ and tests/
zip -d $obj docs/ docs/* tests/ tests/*
# And pack the library with upx
unzip $obj lib/*
upx --no-progress lib/*
zip -r "$obj" lib
fi
|