blob: 6a46c054c1781ce32d0c30a730d8b70f13aaaa72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/bash
set -ex
PV_DEPS=2
PN_DEPS="blogc-lambda-deps"
P_DEPS="${PN_DEPS}-${PV_DEPS}"
A_DEPS="${P_DEPS}.tar.xz"
SRC_DEPS="https://travis-distfiles.rgm.io/${PN_DEPS}/${P_DEPS}/${P_DEPS}.tar.xz"
rm -rf root build
mkdir -p root build
wget -c "${SRC_DEPS}" "${SRC_DEPS}.sha512"
sha512sum -c "${A_DEPS}.sha512"
tar -xvf "${A_DEPS}" -C root/
pushd build > /dev/null
../configure \
CFLAGS="-Wall -g -O0" \
--disable-ronn \
--disable-silent-rules \
--disable-tests \
--disable-valgrind \
--disable-git-receiver \
--disable-runserver \
--enable-make-embedded
popd > /dev/null
make -C build LDFLAGS="-all-static" blogc
PV="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)"
install -m 755 build/blogc root/bin/blogc
install -m 644 src/blogc-github-lambda/lambda_function.py root/lambda_function.py
install -m 644 LICENSE root/licenses/blogc
strip root/bin/blogc
pushd root/ > /dev/null
zip --symlinks -rq "../blogc-github-lambda-${PV}.zip" *
popd > /dev/null
|