Initial work to have proper app compilation and escript generation

Change-Id: I83b9117a1d611a1b992ddf052450509f9bd16964
This commit is contained in:
Pau Espin 2023-10-05 16:15:07 +02:00
parent 804dcd04cc
commit 028b638998
7 changed files with 58 additions and 6 deletions

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
all: build
build:
rebar3 compile
rebar3 escriptize
run: build
_build/default/bin/osmo-epdg
check:
rebar3 eunit
clean:
rm -rf _build/

View File

@ -36,7 +36,7 @@
{escript_name, "osmo-epdg"}.
{relx,
[{release, {"osmo-epdg", "1.0.0"}, [epdg]},
[{release, {"osmo-epdg", "1.0.0"}, [osmo_epdg]},
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"},
{dev_mode, true},

32
rebar.lock Normal file
View File

@ -0,0 +1,32 @@
{"1.2.0",
[{<<"epcap">>,
{git,"https://github.com/msantos/epcap",
{ref,"d5c03caf608c1369e68cfed0a606d3eb82ddfd21"}},
1},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"lager">>,
{git,"https://github.com/erlang-lager/lager",
{ref,"459a3b2cdd9eadd29e5a7ce5c43932f5ccd6eb88"}},
0},
{<<"osmo_gsup">>,
{git,"https://gitea.osmocom.org/erlang/osmo_gsup",
{ref,"ee15ee2b44f4a57c57831393d1fed2dc215d36e4"}},
0},
{<<"osmo_ss7">>,
{git,"https://gitea.osmocom.org/erlang/osmo_ss7",
{ref,"3c6cdc5a53c4a5ec1aff417f2cbfaa9449004ee6"}},
0},
{<<"parse_trans">>,
{git,"https://github.com/uwiger/parse_trans",
{ref,"cdb01ba260ba9a00b2aafa17affead0f6fac081c"}},
1},
{<<"pkt">>,
{git,"https://github.com/msantos/pkt",
{ref,"67a4a14f596fded5ad5f2d8f94318faa8ad2c288"}},
1}]}.
[
{pkg_hash,[
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>}]},
{pkg_hash_ext,[
{<<"goldrush">>, <<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>}]}
].

View File

@ -1,5 +1,5 @@
%-*- mode: erlang -*-
{application, epdg,
{application, osmo_epdg,
[
{description, "ePDG"},
{vsn, "1"},

7
src/osmo_epdg.erl Normal file
View File

@ -0,0 +1,7 @@
-module(osmo_epdg).
-export([main/1]).
main(_Args) ->
application:ensure_all_started(?MODULE),
timer:sleep(infinity).

View File

@ -1,12 +1,11 @@
-module(epdg_app).
-module(osmo_epdg_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
epdg_sup:start_link().
osmo_epdg_sup:start_link().
stop(_State) ->
ok.

View File

@ -1,4 +1,4 @@
-module(epdg_sup).
-module(osmo_epdg_sup).
-behaviour(supervisor).
-export([start_link/0]).