Allow ejabberd to be compatible as a dependency for an Erlang project using rebar3

This commit is contained in:
Michael Slezak 2021-02-16 10:28:30 -07:00
parent 6a6b771e0b
commit 3c16f21413
4 changed files with 44 additions and 19 deletions

View File

@ -67,8 +67,7 @@ fi
AC_PREFIX_DEFAULT(/usr/local)
AC_CONFIG_FILES([Makefile
vars.config
src/ejabberd.app.src])
vars.config])
AC_ARG_ENABLE(all,
[AC_HELP_STRING([--enable-all], [same as --enable-odbc --enable-mysql --enable-pgsql --enable-sqlite --enable-pam --enable-zlib --enable-redis --enable-elixir --enable-stun --enable-sip --enable-debug --enable-tools (useful for Dialyzer checks, default: no)])],

View File

@ -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:

View File

@ -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:

View File

@ -45,6 +45,8 @@
{vsn, "@PACKAGE_VERSION@"}.
%% Variables for overlay template files
{package_name, "@PACKAGE_NAME@"}.
{enabled_backends, [@enabled_backends@]}.
%% Platform-specific installation paths
{release, true}.