aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/build-static.sh
blob: e5a09eda44ee84158b4b6ab3932313cbfe4d689f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

set -ex

export LC_ALL=

${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}"