aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Slezak <mslezak@mz.com>2021-02-16 10:28:30 -0700
committerMichael Slezak <mslezak@mz.com>2021-02-16 10:28:30 -0700
commit3c16f21413290a00f63ec2549bb4b03b888464fd (patch)
tree615d35fe88841b730ff688390e21b550d8ccfc2f /src
parentmod_mam: Add missing semicolon (diff)
Allow ejabberd to be compatible as a dependency for an Erlang project using rebar3
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd.app.src.in17
-rw-r--r--src/ejabberd.app.src.script41
2 files changed, 41 insertions, 17 deletions
diff --git a/src/ejabberd.app.src.in b/src/ejabberd.app.src.in
deleted file mode 100644
index f1d08b8c7..000000000
--- a/src/ejabberd.app.src.in
+++ /dev/null
@@ -1,17 +0,0 @@
-%% $Id$
-
-{application, ejabberd,
- [{description, "@PACKAGE_NAME@"},
- {vsn, "@PACKAGE_VERSION@"},
- {modules, []},
- {registered, []},
- {applications, [kernel, stdlib, sasl, ssl]},
- {included_applications, [os_mon, lager, mnesia, inets, p1_utils, fast_yaml, fast_tls, pkix, xmpp, cache_tab, eimp]},
- {env, [{enabled_backends, [@enabled_backends@]}]},
- {mod, {ejabberd_app, []}}]}.
-
-
-%% Local Variables:
-%% mode: erlang
-%% End:
-%% vim: set filetype=erlang tabstop=8:
diff --git a/src/ejabberd.app.src.script b/src/ejabberd.app.src.script
new file mode 100644
index 000000000..aed4d2158
--- /dev/null
+++ b/src/ejabberd.app.src.script
@@ -0,0 +1,41 @@
+%% $Id$
+Vars = case file:consult(filename:join([filename:dirname(SCRIPT), "..", "vars.config"])) of
+ {ok, Terms} ->
+ Terms;
+ _Err ->
+ []
+ end,
+
+Env = case lists:keyfind(enabled_backends, 1, Vars) of
+ false ->
+ {env, []};
+ Backends ->
+ {env, [Backends]}
+ end,
+
+{application, ejabberd,
+ [{description, "ejabberd"},
+ lists:keyfind(vsn, 1, Vars),
+ {modules, []},
+ {registered, []},
+ {applications, [kernel, stdlib, sasl, ssl]},
+ {included_applications,
+ [os_mon,
+ lager,
+ mnesia,
+ inets,
+ p1_utils,
+ fast_yaml,
+ fast_tls,
+ pkix,
+ xmpp,
+ cache_tab,
+ eimp]},
+ Env,
+ {mod, {ejabberd_app, []}}]}.
+
+
+%% Local Variables:
+%% mode: erlang
+%% End:
+%% vim: set filetype=erlang tabstop=8: