-
Notifications
You must be signed in to change notification settings - Fork 32
/
grpc.yml
83 lines (70 loc) · 2.73 KB
/
grpc.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
- name: copy modules into place
shell: cp -r -n "{{ item.src }}" "{{ item.dest }}"
args:
warn: False
loop:
- {src: /usr/local/src/drachtio-freeswitch-modules/modules/mod_google_transcribe/, dest: "{{freeswitch_sources_path}}/src/mod/applications/"}
- {src: /usr/local/src/drachtio-freeswitch-modules/modules/mod_google_tts/, dest: "{{freeswitch_sources_path}}/src/mod/applications/"}
- {src: /usr/local/src/drachtio-freeswitch-modules/modules/mod_dialogflow/, dest: "{{freeswitch_sources_path}}/src/mod/applications/"}
- {src: /usr/local/src/drachtio-freeswitch-modules/modules/mod_aws_transcribe/, dest: "{{freeswitch_sources_path}}/src/mod/applications/"}
- name: apply patches for grpc
patch:
remote_src: no
src: "{{ item.src }}"
dest: "{{ item.dest }}"
loop:
- {src: "configure.ac.grpc.patch", dest: "{{freeswitch_sources_path}}/configure.ac"}
- {src: "Makefile.am.grpc.patch", dest: "{{freeswitch_sources_path}}/Makefile.am"}
- {src: "modules.conf.in.grpc.patch", dest: "{{freeswitch_sources_path}}/build/modules.conf.in"}
- name: copy vanilla conf
copy:
src: modules.conf.vanilla.xml.grpc
dest: "{{freeswitch_sources_path}}/conf/vanilla/autoload_configs/modules.conf.xml"
- name: check out aws-sdk-cpp
git:
repo: https://github.com/aws/aws-sdk-cpp.git
dest: "{{freeswitch_sources_path}}/libs/aws-sdk-cpp"
version: "{{aws_sdk_version}}"
depth: 50
accept_hostkey: yes
force: yes
- name: build aws-sdk-cpp
shell: |
mkdir -p build && cd build
cmake .. -DBUILD_ONLY=transcribestreaming -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF
make
args:
chdir: "{{freeswitch_sources_path}}/libs/aws-sdk-cpp"
#- name: determine latest release to install
# command: curl -L https://grpc.io/release
# args:
# warn: false
# register: latest_grpc_release
- name: check out grpc
git: repo=https://github.com/grpc/grpc
dest=/usr/local/src/grpc
version={{grpc_version}}
depth=50
accept_hostkey=yes
force=yes
- name: update submodules
shell: git submodule update --init --recursive
args:
chdir: /usr/local/src/grpc
- name: build grpc protobuf
shell: ./autogen.sh && ./configure && make install
args:
chdir: /usr/local/src/grpc/third_party/protobuf
- name: build grpc
shell: export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH && make && make install
args:
chdir: /usr/local/src/grpc
- name: check out googleapis
git: repo=https://github.com/davehorton/googleapis
dest={{freeswitch_sources_path}}/libs/googleapis
version=dialogflow-v2-support
accept_hostkey=yes
force=yes
- name: build googleapis
shell: LANGUAGE=cpp make chdir={{freeswitch_sources_path}}/libs/googleapis