Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mirror
erlang
Commits
98a4bd03
Commit
98a4bd03
authored
Jan 09, 2016
by
Tim Smith
Browse files
Merge pull request #35 from chef-cookbooks/lcg/no-computed-attributes
remove computed attributes
parents
ed72f11f
14cb3891
Changes
2
Hide whitespace changes
Inline
Side-by-side
attributes/default.rb
View file @
98a4bd03
...
...
@@ -19,7 +19,6 @@ default['erlang']['gui_tools'] = false
default
[
'erlang'
][
'install_method'
]
=
'package'
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'
]
=
''
...
...
recipes/source.rb
View file @
98a4bd03
...
...
@@ -37,21 +37,27 @@ erlang_deps.each do |pkg|
end
end
erlang_version
=
node
[
'erlang'
][
'source'
][
'version'
]
erlang_url
=
node
[
'erlang'
][
'source'
][
'url'
]
||
"http://erlang.org/download/otp_src_
#{
erlang_version
}
.tar.gz"
erlang_checksum
=
node
[
'erlang'
][
'source'
][
'checksum'
]
erlang_build_flags
=
node
[
'erlang'
][
'source'
][
'build_flags'
]
erlang_cflags
=
node
[
'erlang'
][
'source'
][
'cflags'
]
bash
'install-erlang'
do
cwd
Chef
::
Config
[
:file_cache_path
]
code
<<-
EOH
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)
tar -xzf otp_src_
#{
erlang_
version
}
.tar.gz
(cd otp_src_
#{
erlang_
version
}
&& ./configure
#{
erlang_
build_flags
}
&& make && make install)
EOH
environment
(
'CFLAGS'
=>
node
[
'erlang'
][
'source'
][
'
cflags
'
]
)
environment
(
'CFLAGS'
=>
erlang_
cflags
)
action
:nothing
not_if
"erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | grep
#{
node
[
'erlang'
][
'source'
][
'
version
'
]
}
"
not_if
"erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | grep
#{
erlang_
version
}
"
end
remote_file
File
.
join
(
Chef
::
Config
[
:file_cache_path
],
"otp_src_
#{
node
[
'erlang'
][
'source'
][
'
version
'
]
}
.tar.gz"
)
do
source
node
[
'erlang'
][
'source'
][
'
url
'
]
remote_file
File
.
join
(
Chef
::
Config
[
:file_cache_path
],
"otp_src_
#{
erlang_
version
}
.tar.gz"
)
do
source
erlang_
url
owner
'root'
mode
0644
checksum
node
[
'erlang'
][
'source'
][
'
checksum
'
]
checksum
erlang_
checksum
notifies
:run
,
'bash[install-erlang]'
,
:immediately
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment