Commit 1d53d882 authored by Tim Smith's avatar Tim Smith
Browse files

Require Chef 12.1+ and use multipackage for installs


Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent c53ba265
# erlang Cookbook
[![Build Status](https://travis-ci.org/chef-cookbooks/erlang.svg?branch=master)](https://travis-ci.org/chef-cookbooks/erlang) [![Cookbook Version](https://img.shields.io/cookbook/v/erlang.svg)](https://supermarket.chef.io/cookbooks/erlang)
Manages installation of Erlang via packages or source.
## Requirements
### Platforms
- Debian/Ubuntu
- RHEL/CentOS/Scientific/Amazon/Oracle
### Chef
- Chef 11+
- Chef 12.1+
### Cookbooks
- yum
- compat_resource
- yum-epel
- yum-erlang_solutions
- build-essential (for source compilation)
## Attributes
- `node['erlang']['gui_tools']` - whether to install the GUI tools for
- Erlang.
- `node['erlang']['install_method']` - Erlang installation method
......@@ -36,19 +42,25 @@ Manages installation of Erlang via packages or source.
- (e.g., maverick vs precise).
## Recipes
### default
Manages installation of Erlang. Includes the package or source recipe depending on the value of `node['erlang']['install_method']`.
### package
Installs Erlang from distribution packages.
### source
Installs Erlang from source.
### esl
Adds Erlang Solutions' [package repositories][] on Debian, CentOS (>5), and Fedora systems, and installs the `esl-erlang` package.
Adds Erlang Solutions' [package repositories] on Debian, CentOS (>5), and Fedora systems, and installs the `esl-erlang` package.
## License & Authors
- Author: Joe Williams ([joe@joetify.com](mailto:joe@joetify.com))
- Author: Joshua Timberman ([joshua@chef.io](mailto:joshua@chef.io))
- Author: Matt Ray ([matt@chef.io](mailto:matt@chef.io))
......@@ -56,7 +68,7 @@ Adds Erlang Solutions' [package repositories][] on Debian, CentOS (>5), and Fedo
- Author: Christopher Maier ([cm@chef.io](mailto:cm@chef.io))
```text
Copyright 2011-2015, Chef Software, Inc.
Copyright 2011-2016, Chef Software, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
......@@ -21,7 +21,7 @@ recipe 'erlang::esl', "Installs Erlang from Erlang Solutions' package repositori
supports os
end
source_url 'https://github.com/chef-cookbooks/erlang' if respond_to?(:source_url)
issues_url 'https://github.com/chef-cookbooks/erlang/issues' if respond_to?(:issues_url)
source_url 'https://github.com/chef-cookbooks/erlang'
issues_url 'https://github.com/chef-cookbooks/erlang/issues'
chef_version '>= 11' if respond_to?(:chef_version)
chef_version '>= 12.1'
......@@ -22,19 +22,11 @@
include_recipe 'build-essential'
erlang_deps = case node['platform_family']
when 'debian'
%w(libncurses5-dev openssl libssl-dev)
when 'rhel', 'fedora'
%w(ncurses-devel openssl-devel)
else
[]
end
erlang_deps.each do |pkg|
package pkg do
action :install
end
case node['platform_family']
when 'debian'
package %w(libncurses5-dev openssl libssl-dev)
when 'rhel', 'fedora'
package %w(ncurses-devel openssl-devel)
end
erlang_version = node['erlang']['source']['version']
......
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