-
Notifications
You must be signed in to change notification settings - Fork 94
/
rebar.config.script
96 lines (87 loc) · 3.54 KB
/
rebar.config.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{IsEE, Package} = case os:getenv("RIAK_CS_EE_DEPS") of
false -> {false, "riak-cs"};
_ -> {true, "riak-cs-ee"}
end,
io:format("Building ~s~n", [Package]),
DepsUpdated =
case IsEE of
false ->
CONFIG;
true ->
{value, {deps, Deps}} = lists:keysearch(deps, 1, CONFIG),
{value, {deps_ee, DepsEE}} = lists:keysearch(deps_ee, 1, CONFIG),
lists:keyreplace(deps, 1, CONFIG, {deps, Deps ++ DepsEE})
end,
XrefQueryUpdated =
case IsEE of
false ->
DepsUpdated;
true ->
{value, {xref_queries_ee, QueriesEE}} =
lists:keysearch(xref_queries_ee, 1, DepsUpdated),
lists:keyreplace(xref_queries, 1, DepsUpdated, {xref_queries, QueriesEE})
end,
FinalConfig = XrefQueryUpdated,
%% Write dialyzer.ignore_warnings
{ok, _} = file:copy("dialyzer.ignore-warnings.ee", "dialyzer.ignore-warnings"),
case IsEE of
false ->
{ok, _} = file:copy("dialyzer.ignore-warnings.oss",
{"dialyzer.ignore-warnings", [append]});
true -> ok
end,
%% Write pkg.vars.config
case IsEE of
false ->
Bytes = "%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
%%
%% Packaging
%%
{package_name, \"riak-cs\"}.
{package_install_name, \"riak-cs\"}.
{package_install_user, \"riakcs\"}.
{package_install_group, \"riak\"}.
{package_install_user_desc, \"Riak CS user\"}.
{package_commands, {list, [[{name, \"riak-cs\"}], [{name, \"riak-cs-access\"}], [{name, \"riak-cs-gc\"}], [{name, \"riak-cs-storage\"}], [{name, \"riak-cs-stanchion\"}], [{name, \"riak-cs-debug\"}], [{name, \"riak-cs-admin\"}]]}}.
{package_shortdesc, \"Riak CS\"}.
{package_patch_dir, \"basho-patches\"}.
{package_desc, \"Riak CS\"}.
{bin_or_sbin, \"sbin\"}.
{license_type, \"Apache License, Version 2.0\"}.
{copyright, \"2013 Basho Technologies, Inc\"}.
{vendor_name, \"Basho Technologies, Inc\"}.
{vendor_url, \"http://basho.com\"}.
{vendor_contact_name, \"Basho Package Maintainer\"}.
{vendor_contact_email, \"[email protected]\"}.
{license_full_text, \"This software is provided under license from Basho Technologies.\"}.
{solaris_pkgname, \"BASHOriak-cs\"}.",
file:write_file("pkg.vars.config", Bytes);
true ->
Bytes = "%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
%%
%% Packaging
%%
{package_name, \"riak-cs-ee\"}.
{package_install_name, \"riak-cs\"}.
{package_install_user, \"riakcs\"}.
{package_install_group, \"riak\"}.
{package_install_user_desc, \"Riak CS user\"}.
{package_commands, {list, [[{name, \"riak-cs\"}], [{name, \"riak-cs-access\"}], [{name, \"riak-cs-gc\"}], [{name, \"riak-cs-storage\"}], [{name, \"riak-cs-stanchion\"}], [{name, \"riak-cs-debug\"}], [{name, \"riak-cs-admin\"}], [{name, \"riak-cs-supercluster\"}], [{name, \"riak-cs-multibag\"}]]}}.
{package_shortdesc, \"Riak CS\"}.
{package_patch_dir, \"basho-patches\"}.
{package_desc, \"Riak CS\"}.
{bin_or_sbin, \"sbin\"}.
{license_type, \"Proprietary\"}.
{copyright, \"2013 Basho Technologies, Inc\"}.
{vendor_name, \"Basho Technologies, Inc\"}.
{vendor_url, \"http://basho.com\"}.
{vendor_contact_name, \"Basho Package Maintainer\"}.
{vendor_contact_email, \"[email protected]\"}.
{license_full_text, \"This software is provided under license from Basho Technologies.\"}.
{solaris_pkgname, \"BASHOriak-cs-ee\"}.
{debuild_extra_options, \"-e RIAK_CS_EE_DEPS=true\"}.",
file:write_file("pkg.vars.config", Bytes)
end,
FinalConfig.