forked from ernw/ss7MAPer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare_n_build.sh
executable file
·57 lines (44 loc) · 1.52 KB
/
prepare_n_build.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
#!/bin/sh -x
git clone https://github.com/ernw/ss7MAPer
cd ss7MAPer
rebar get-deps
cd deps/osmo_map
patch -p1 < ../../patches/osmo_map.patch
cd ../osmo_sccp
patch -p1 < ../../patches/osmo_sccp.patch
cd ../osmo_ss7
patch -p1 < ../../patches/osmo_ss7.patch
cd ../../
sed -i 's/DRV_CFLAGS/CFLAGS/g' deps/epcap/rebar.config
sed -i 's/DRV_LDFLAGS/LDFLAGS/g' deps/epcap/rebar.config
cd deps
git clone http://cgit.osmocom.org/erlang/signerl/
cd signerl/TCAP/asn_src/ITU
make
cd ../../../../..
cp deps/signerl/TCAP/asn_src/ITU/*rl deps/osmo_sccp/src/
mkdir deps/epcap/deps
ln -sd ../../pkt deps/epcap/deps/pkt
mkdir deps/osmo_sccp/deps
ln -sd ../../osmo_ss7 deps/osmo_sccp/deps/osmo_ss7
ln -sd ../../epcap deps/osmo_sccp/deps/epcap
ln -sd ../../pkt deps/osmo_sccp/deps/pkt
ln -sd ../../signerl/MAP deps/osmo_sccp/deps/MAP
ln -sd ../../signerl/SCCP deps/osmo_sccp/deps/SCCP
ln -sd ../../signerl/TCAP deps/osmo_sccp/deps/TCAP
mkdir deps/osmo_map/deps
ln -sd ../../osmo_ss7 deps/osmo_map/deps/osmo_ss7
ln -sd ../../epcap deps/osmo_map/deps/epcap
ln -sd ../../pkt deps/osmo_map/deps/pkt
cp deps/signerl/SCCP/itu/include/sccp.hrl deps/osmo_sccp/src/
cp deps/signerl/TCAP/include/tcap.hrl deps/osmo_map/src/
rebar co
cd rel/
rebar create-node nodeid=ss7MAPer
cd ..
rm deps/signerl/TCAP/ebin/tcap_cco_server.beam
rm deps/signerl/TCAP/ebin/tcap_ism_fsm.beam
rm deps/signerl/TCAP/ebin/tcap_tco_server.beam
rm deps/signerl/TCAP/ebin/tcap_tsm_fsm.beam
rm deps/signerl/TCAP/ebin/tcap_dha_fsm.beam
rebar generate