summaryrefslogtreecommitdiff
path: root/init
blob: 82ce7de70ccafe8227b649ef3a8a7da03a687496 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh -ex

cp luasocket-packageing/luasocket-scm-3.rockspec luasocket/luasocket-scm-3.rockspec
cd luasocket

luarocks config variables.CFLAGS " $CFLAGS"
luarocks make --pack-binary-rock luasocket-scm-3.rockspec
obj="luasocket-scm-3.$(luarocks config arch).rock"
cp $obj /root
cd /root
if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
  # And pack the library with upx
  unzip $obj lib/*
  upx --no-progress lib/*
  zip -r "$obj" lib
fi