forked from rdkcentral/bluetooth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_dependencies.sh
More file actions
58 lines (39 loc) · 1.49 KB
/
Copy pathbuild_dependencies.sh
File metadata and controls
58 lines (39 loc) · 1.49 KB
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
#!/bin/bash
set -e
echo "Installing system dependencies..."
apt-get update
apt-get install -y \
autoconf automake libtool pkg-config \
gcc g++ make \
libglib2.0-dev libdbus-1-dev libbluetooth-dev \
git
WORKSPACE=$(pwd)
echo "Setting up telemetry stub..."
git clone https://github.com/rdkcentral/telemetry.git
mkdir -p ${WORKSPACE}/external/include
mkdir -p ${WORKSPACE}/external/lib
cp telemetry/include/telemetry_busmessage_sender.h ${WORKSPACE}/external/include/
cp telemetry/include/telemetry2_0.h ${WORKSPACE}/external/include/
cat << 'EOF' > telemetry_stub.c
int t2_init(void) { return 0; }
int t2_event_s(const char* n, const char* v) { return 0; }
int t2_event_f(const char* n, float v) { return 0; }
int t2_event_d(const char* n, double v) { return 0; }
EOF
gcc -shared -fPIC telemetry_stub.c \
-o ${WORKSPACE}/external/lib/libtelemetry_msgsender.so
echo "Setting up BlueZ legacy headers..."
git clone https://github.com/bluez/bluez.git
mkdir -p ${WORKSPACE}/external/include/bluetooth/audio
mkdir -p ${WORKSPACE}/external/include/bluetooth
git -C bluez checkout tags/4.101
cp bluez/audio/ipc.h \
${WORKSPACE}/external/include/bluetooth/audio/ipc.h
git -C bluez checkout tags/5.48
cp bluez/profiles/audio/a2dp-codecs.h \
${WORKSPACE}/external/include/bluetooth/audio/a2dp-codecs.h
cp bluez/lib/bluetooth.h \
${WORKSPACE}/external/include/bluetooth/bluetooth.h
sed -i '1i#include <stdbool.h>\n' \
${WORKSPACE}/external/include/bluetooth/audio/ipc.h
echo "Dependencies setup completed."