Browse files

Clang 3.2

  • Loading branch information...
1 parent ea2653c commit fde20b2fe9fe32a0fa214183f8d9f5420394fe36 @michaelklishin committed Jan 20, 2013
Showing with 6 additions and 25 deletions.
  1. +2 −7 attributes/tarball.rb
  2. +1 −1 recipes/default.rb
  3. +3 −17 recipes/tarball.rb
View
9 attributes/tarball.rb
@@ -1,11 +1,6 @@
-version = "3.1"
+version = "3.2"
default[:clang] = {
:version => version,
- :arch => case version
- when "3.1" then
- kernel['machine'] =~ /x86_64/ ? "x86_64" : "x86"
- else
- kernel['machine'] =~ /x86_64/ ? "x86_64" : "i386"
- end
+ :arch => (kernel['machine'] =~ /x86_64/ ? "x86_64" : "x86")
}
View
2 recipes/default.rb
@@ -1,7 +1,7 @@
#
# Cookbook Name:: clang
# Recipe:: default
-# Copyright 2012, Travis CI development team
+# Copyright 2012-2013, Travis CI Development Team <contact@travis-ci.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
View
20 recipes/tarball.rb
@@ -1,7 +1,7 @@
#
# Cookbook Name:: clang
# Recipe:: tarball
-# Copyright 2012, Travis CI development team
+# Copyright 2012-2013, Travis CI Development Team <contact@travis-ci.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -21,11 +21,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-platform_name, ext = case [node[:platform], node[:platform_version]]
- when ["ubuntu", "11.10"]
- ["#{node[:platform]}-#{node[:platform_version]}", "tar.bz2"]
+platform_name, ext = case [node.platform, node.platform_version]
when ["ubuntu", "12.04"]
- ["#{node[:platform]}_#{node[:platform_version]}", "tar.gz"]
+ ["#{node.platform}-#{node.platform_version.gsub(/_/, '-')}", "tar.gz"]
end
filename = "clang+llvm-#{node.clang.version}-#{node.clang.arch}-linux-#{platform_name}"
@@ -67,21 +65,9 @@
# 4. Symlink
%w(clang clang++ llvm-ld llvm-link).each do |f|
- # due to a Chef bug that prevents not_if for the link resource from doing the
- # correct thing. MK.
- bash "Remove the symlink to /usr/local/bin/#{f}" do
- user "root"
- cwd "/tmp"
-
- code <<-EOS
- rm -f /usr/local/bin/#{f}
- EOS
- end
-
link "/usr/local/bin/#{f}" do
owner "root"
group "root"
to "#{installation_dir}/bin/#{f}"
- not_if "test -L /usr/local/bin/#{f}"
end
end

0 comments on commit fde20b2

Please sign in to comment.