Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Update build-essential cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel250 committed Mar 24, 2013
1 parent 4998f1d commit 9d210e4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions build-essential/CHANGELOG.md
@@ -1,3 +1,7 @@
## v1.3.4:

* [COOK-2272] - Complete `platform_family` conversion in build-essential

## v1.3.2:

* [COOK-2069] - build-essential will install osx-gcc-installer when
Expand Down
2 changes: 1 addition & 1 deletion build-essential/Gemfile
@@ -1,3 +1,3 @@
source :rubygems

gem 'test-kitchen'
gem 'test-kitchen', '< 1.0'
2 changes: 2 additions & 0 deletions build-essential/README.md
Expand Up @@ -8,6 +8,8 @@ with native extensions.
Requirements
============

Chef version 0.10.10+ and Ohai 0.6.12+ are required.

## Platform

Supported platforms by platform family:
Expand Down
2 changes: 1 addition & 1 deletion build-essential/attributes/default.rb
Expand Up @@ -19,7 +19,7 @@

default['build_essential']['compiletime'] = false

case node['platform']
case node['platform_family']
when "mac_os_x"
case
when Chef::VersionConstraint.new("~> 10.7.0").include?(node['platform_version']),
Expand Down
5 changes: 3 additions & 2 deletions build-essential/metadata.rb
Expand Up @@ -3,12 +3,13 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs C compiler / build tools"
version "1.3.2"
version "1.3.4"
recipe "build-essential", "Installs packages required for compiling C software from source."

%w{ fedora redhat centos ubuntu debian amazon suse scientific smartos}.each do |os|
%w{ fedora redhat centos ubuntu debian amazon suse scientific oracle smartos}.each do |os|
supports os
end

supports "mac_os_x", ">= 10.6.0"
supports "mac_os_x_server", ">= 10.6.0"
suggests "pkgin"
14 changes: 7 additions & 7 deletions build-essential/recipes/default.rb
Expand Up @@ -21,8 +21,8 @@

compiletime = node['build_essential']['compiletime']

case node['platform']
when "centos", "redhat", "suse", "fedora", "scientific", "amazon", "ubuntu","debian"
case node['platform_family']
when "rhel", "suse", "fedora", "debian"

# on apt-based platforms when first provisioning we need to force
# apt-get update at compiletime if we are going to try to install at compiletime
Expand Down Expand Up @@ -64,12 +64,12 @@
when "smartos"
include_recipe 'pkgin'
%w{gcc47 gcc47-runtime scmgit-base gmake pkg-config binutils}.each do |package|
pkgin_package package do
action :install
end
end
pkgin_package package do
action :install
end
end

when "darwin"
when "mac_os_x"
result = Chef::ShellOut.new("pkgutil --pkgs").run_command
osx_gcc_installer_installed = result.stdout.split("\n").include?("com.apple.pkg.gcc4.2Leo")
developer_tools_cli_installed = result.stdout.split("\n").include?("com.apple.pkg.DeveloperToolsCLI")
Expand Down

0 comments on commit 9d210e4

Please sign in to comment.