24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-30 23:02:00 +02:00
xmpp.chapril.org-ejabberd/rebar.config.script.in
2013-05-02 18:15:03 +10:00

94 lines
3.4 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author Evgeniy Khramtsov <ekhramtsov@process-one.net>
%%% @copyright (C) 2013, Evgeniy Khramtsov
%%% @doc
%%%
%%% @end
%%% Created : 1 May 2013 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
%%%-------------------------------------------------------------------
Cfg = [%% Macros
{roster_gateway_workaround, @roster_gateway_workaround@},
{flash_hack, @flash_hack@},
{transient_supervisors, @transient_supervisors@},
{full_xml, @full_xml@},
{nif, @nif@},
{db_type, @db_type@},
{debug, @debug@},
%% Dependencies
{mysql, @mysql@},
{pgsql, @pgsql@},
{pam, @pam@},
{zlib, @zlib@},
{stun, @stun@},
{riak, @riak@},
{json, @json@},
{iconv, @iconv@}],
Macros = lists:flatmap(
fun({roster_gateway_workaround, true}) ->
[{d, 'ROSTER_GATEWAY_WORKAROUND'}];
({flash_hack, true}) ->
[{d, 'ENABLE_FLASH_HACK'}];
({transient_supervisors, true}) ->
[{d, 'NO_TRANSIENT_SUPERVISORS'}];
({full_xml, true}) ->
[{d, 'FULL_XML_SUPPORT'}];
({nif, true}) ->
[{d, 'NIF'}];
({db_type, mssql}) ->
[{d, 'mssql'}];
(_) ->
[]
end, Cfg),
DebugInfo = case lists:keysearch(debug, 1, Cfg) of
{value, {debug, true}} ->
[debug_info];
_ ->
[]
end,
Head = [{erl_opts, [{i, "include"},
{i, filename:join(["deps", "logger", "include"])},
{i, filename:join(["deps", "xml", "include"])}]
++ Macros ++ DebugInfo},
{src_dirs, [asn1, src]},
{sub_dirs, ["rel"]}],
Deps = [{logger, ".*", {git, "git://github.com/processone/p1_logger"}},
{tls, ".*", {git, "git://github.com/processone/tls"}},
{stringprep, ".*", {git, "git://github.com/processone/stringprep"}},
{ibrowse, ".*", {git, "git://github.com/cmullaparthi/ibrowse"}},
{lhttpc, ".*", {git, "git://github.com/esl/lhttpc"}},
%%{xml, ".*", {git, "git://github.com/processone/xml"}},
{xmlrpc, ".*", {git, "git://github.com/etnt/xmlrpc"}}],
CfgDeps = lists:flatmap(
fun({mysql, true}) ->
[{mysql, ".*", {git, "git://github.com/processone/mysql"}}];
({pgsql, true}) ->
[{pgsql, ".*", {git, "git://github.com/processone/pgsql"}}];
({pam, true}) ->
[{epam, ".*", {git, "git://github.com/processone/epam"}}];
({zlib, true}) ->
[{ezlib, ".*", {git, "git://github.com/processone/zlib"}}];
({stun, true}) ->
[{stun, ".*", {git, "git://github.com/processone/stun"}}];
({riak, true}) ->
[{riakc, ".*", {git, "git://github.com/basho/riak-erlang-client"}}];
({json, true}) ->
[{jiffy, ".*", {git, "git://github.com/davisp/jiffy"}}];
({iconv, true}) ->
[{iconv, ".*", {git, "git://github.com/processone/eiconv"}}];
(_) ->
[]
end, Cfg),
Head ++ [{deps, Deps ++ CfgDeps}].
%% Local Variables:
%% mode: erlang
%% End:
%% vim: set filetype=erlang tabstop=8: