aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/targets/static.sh
diff options
context:
space:
mode:
Diffstat (limited to '.travis/targets/static.sh')
-rw-r--r--.travis/targets/static.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/.travis/targets/static.sh b/.travis/targets/static.sh
new file mode 100644
index 0000000..d0bb42f
--- /dev/null
+++ b/.travis/targets/static.sh
@@ -0,0 +1,32 @@
+build() {
+ default_configure \
+ CFLAGS="-Wall -g -O2" \
+ --disable-tests \
+ --disable-git-receiver \
+ --disable-runserver \
+ --enable-make-embedded
+
+ make LDFLAGS="-all-static" blogc
+
+ rm -rf root
+ mkdir -p root
+
+ PV="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)"
+
+ 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}"
+}
+
+deploy() {
+ FILES=( *.zip blogc-static-*.xz )
+ [[ ${RV} -eq 0 ]] && [[ "x${CC}" = "xgcc" ]]
+}