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

cp luaossl-packaging/luaossl-git-0.rockspec luaossl
cd luaossl
luarocks config variables.CFLAGS " $CFLAGS"
luarocks make --pack-binary-rock luaossl-git-0.rockspec
obj="luaossl-git.$(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