aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/build-static.sh
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-05-07 00:13:44 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-05-07 00:13:44 +0200
commit9543748bda8bfcad015243a9d312cf203431b29f (patch)
tree29455f665fe933cd76ac6c1c90b9916898f9050d /build-aux/build-static.sh
parent0a7f6a2659b363e1d68202b9fd863b57f7420f4f (diff)
downloadblogc-9543748bda8bfcad015243a9d312cf203431b29f.tar.gz
blogc-9543748bda8bfcad015243a9d312cf203431b29f.tar.bz2
blogc-9543748bda8bfcad015243a9d312cf203431b29f.zip
build: use yatr
Diffstat (limited to 'build-aux/build-static.sh')
-rwxr-xr-xbuild-aux/build-static.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/build-aux/build-static.sh b/build-aux/build-static.sh
new file mode 100755
index 0000000..39d6444
--- /dev/null
+++ b/build-aux/build-static.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -ex
+
+PV="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)"
+
+${MAKE_CMD:-make} LDFLAGS="-all-static" blogc
+
+rm -rf root
+mkdir -p root
+
+install -m 755 blogc root/blogc
+install -m 644 src/blogc-github-lambda/lambda_function.py root/lambda_function.py
+install -m 644 ../LICENSE root/LICENSE
+strip root/blogc
+
+pushd root > /dev/null
+zip "../blogc-github-lambda-${PV}.zip" *
+popd > /dev/null
+
+install -m 755 root/blogc "blogc-static-amd64-${PV}"
+xz -z "blogc-static-amd64-${PV}"