forked from stsaz/phiola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxbuild-debianbuster.sh
65 lines (53 loc) · 1.27 KB
/
xbuild-debianbuster.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# phiola: cross-build on Linux for Debian-buster
set -xe
if ! test -d "../phiola" ; then
exit 1
fi
if ! podman container exists phiola_debianbuster_build ; then
if ! podman image exists phiola-debianbuster-builder ; then
# Create builder image
cat <<EOF | podman build -t phiola-debianbuster-builder -f - .
FROM debian:buster-slim AS cxx-debianbuster-builder
RUN apt update && \
apt install -y \
gcc g++ make
FROM cxx-debianbuster-builder
RUN apt install -y \
libasound2-dev libpulse-dev libjack-dev \
libdbus-1-dev \
libgtk-3-dev \
zstd unzip cmake patch dos2unix curl
EOF
fi
# Create builder container
podman create --attach --tty \
-v `pwd`/..:/src \
--name phiola_debianbuster_build \
phiola-debianbuster-builder \
bash -c 'cd /src/phiola && source ./build_linux.sh'
fi
# Prepare build script
# Note that openssl-3 must be built from source.
cat >build_linux.sh <<EOF
set -xe
make -j8 openssl \
-C ../netmill/3pt
make -j8 libzstd \
-C ../ffpack
make -j8 \
-C alib3
mkdir -p _linux-amd64
make -j8 \
-C _linux-amd64 \
-f ../Makefile \
ROOT_DIR=../.. \
CFLAGS_USER=-fno-diagnostics-color \
$@
make -j8 app \
-C _linux-amd64 \
-f ../Makefile \
ROOT_DIR=../..
EOF
# Build inside the container
podman start --attach phiola_debianbuster_build