25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00
xmpp.chapril.org-ejabberd/rel/reltool.config.script
Evgeniy Khramtsov 4d8f770624 Switch to rebar build tool
Use dynamic Rebar configuration
Make iconv dependency optional
Disable transient_supervisors compile option
Add hipe compilation support
Only compile ibrowse and lhttpc when needed
Make it possible to generate an OTP application release
Add --enable-debug compile option
Add --enable-all compiler option
Add --enable-tools configure option
Add --with-erlang configure option.
Add --enable-erlang-version-check configure option.
Add lager support
Improve the test suite
2013-06-13 11:11:02 +02:00

105 lines
3.5 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author Evgeniy Khramtsov <ekhramtsov@process-one.net>
%%% @copyright (C) 2013, Evgeniy Khramtsov
%%% @doc
%%%
%%% @end
%%% Created : 8 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
%%%-------------------------------------------------------------------
Vars = case file:consult(filename:join(["..", "vars.config"])) of
{ok, Terms} ->
Terms;
_Err ->
[]
end,
RequiredOTPApps = [sasl, crypto, public_key, ssl,
mnesia, inets, compiler],
ConfiguredOTPApps = lists:flatmap(
fun({tools, true}) ->
[tools, runtime_tools];
(_) ->
[]
end, Vars),
OTPApps = RequiredOTPApps ++ ConfiguredOTPApps,
DepRequiredApps = [p1_logger, p1_cache_tab, p1_tls, p1_stringprep, p1_xml, xmlrpc],
DepConfiguredApps = lists:flatmap(
fun({mysql, true}) -> [p1_mysql];
({pgsql, true}) -> [p1_pgsql];
({pam, true}) -> [p1_pam];
({zlib, true}) -> [p1_zlib];
({stun, true}) -> [p1_stun];
({json, true}) -> [jiffy];
({iconv, true}) -> [p1_iconv];
({http, true}) -> [ibrowse, lhttpc];
({odbc, true}) -> [odbc];
(_) -> []
end, Vars),
DepApps = DepRequiredApps ++ DepConfiguredApps,
Sys = [{lib_dirs, []},
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "ejabberd", proplists:get_value(vsn, Vars),
[
kernel,
stdlib,
ejabberd
] ++ OTPApps ++ DepApps},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "ejabberd"},
{profile, embedded},
{incl_cond, exclude},
{excl_archive_filters, [".*"]}, %% Do not archive built libs
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
"^erts.*/(doc|info|include|lib|man|src)"]},
{excl_app_filters, ["\.gitignore"]},
{app, stdlib, [{incl_cond, include}]},
{app, kernel, [{incl_cond, include}]},
{app, ejabberd, [{incl_cond, include}, {lib_dir, ".."}]}]
++ lists:map(
fun(App) ->
{app, App, [{incl_cond, include},
{lib_dir, "../deps/" ++ atom_to_list(App)}]}
end, DepApps)
++ lists:map(
fun(App) ->
{app, App, [{incl_cond, include}]}
end, OTPApps).
Overlay = [
{mkdir, "var/log/ejabberd"},
{mkdir, "var/lock"},
{mkdir, "var/lib/ejabberd"},
{mkdir, "etc/ejabberd"},
{mkdir, "doc"},
{template, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
{template, "../ejabberdctl.template", "bin/ejabberdctl"},
{copy, "../ejabberdctl.cfg.example", "etc/ejabberd/ejabberdctl.cfg"},
{copy, "../ejabberd.cfg.example", "etc/ejabberd/ejabberd.cfg"},
{copy, "../inetrc", "etc/ejabberd/inetrc"},
{copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"}
],
Config = [{sys, Sys},
{overlay_vars, "../vars.config"},
{target_dir, "ejabberd"},
{overlay, Overlay}],
%%io:format("ejabberd release:~n ~p~n", [Config]),
Config.
%% Local Variables:
%% mode: erlang
%% End:
%% vim: set filetype=erlang tabstop=8: