Commit 5933c760 authored by Hector Castro's avatar Hector Castro Committed by Sean OMeara
Browse files

[COOK-4296] Add an attribute for passing CFLAGS prior to compilation


Signed-off-by: default avatarSean OMeara <someara@opscode.com>
parent 63de1a8a
......@@ -37,6 +37,7 @@ Attributes
* `node['erlang']['source']['url']` - URL of Erlang/OTP source tarball.
* `node['erlang']['source']['checksum']` - Checksum of the Erlang/OTP source tarball.
* `node['erlang']['source']['build_flags']` - Build flags for compiling Erlang/OTP.
* `node['erlang']['source']['cflags']` - CFLAGS for configuring Erlang/OTP.
* `node['erlang']['esl']['version']` - version specifier for Erlang
Solutions packages.
* `node['erlang']['esl']['lsb_codename']` - override the code name
......
......@@ -22,6 +22,7 @@ default['erlang']['source']['version'] = 'R15B01'
default['erlang']['source']['url'] = "http://erlang.org/download/otp_src_#{node['erlang']['source']['version']}.tar.gz"
default['erlang']['source']['checksum'] = 'f94f7de7328af3c0cdc42089c1a4ecd03bf98ec680f47eb5e6cddc50261cabde'
default['erlang']['source']['build_flags'] = ''
default['erlang']['source']['cflags'] = ''
default['erlang']['esl']['version'] = nil
default['erlang']['esl']['lsb_codename'] = node['lsb']['codename']
......@@ -43,6 +43,7 @@ bash 'install-erlang' do
tar -xzf otp_src_#{node['erlang']['source']['version']}.tar.gz
(cd otp_src_#{node['erlang']['source']['version']} && ./configure #{node['erlang']['source']['build_flags']} && make && make install)
EOH
environment({"CFLAGS" => node['erlang']['source']['cflags']})
action :nothing
not_if "erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | grep #{node['erlang']['source']['version']}"
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment