Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ragel 6.7 via .deb package hosted on files.travis-ci.org

  • Loading branch information...
commit 4bdc8f39872bd1f3e157bda3e90e5da8a8d83e73 1 parent 4dcc113
@michaelklishin michaelklishin authored
Showing with 33 additions and 3 deletions.
  1. +33 −3 ci_environment/ragel/recipes/default.rb
View
36 ci_environment/ragel/recipes/default.rb
@@ -21,6 +21,36 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-package "ragel" do
- action :install
-end
+require "tmpdir"
+require "rbconfig"
+
+tmp = Dir.tmpdir
+case node[:platform]
+when "debian", "ubuntu"
+ pkg = if RbConfig::CONFIG['arch'] =~ /64/
+ "ragel_6.7-1_amd64.deb"
+ else
+ "ragel_6.7-1_i386.deb"
+ end
+
+ path = File.join(tmp, pkg)
+
+ remote_file(path) do
+ source "http://files.travis-ci.org/packages/deb/ragel/#{pkg}"
+ owner node.travis_build_environment.user
+ group node.travis_build_environment.group
+ end
+
+ file(path) do
+ action :nothing
+ end
+
+ package(pkg) do
+ action :install
+ source path
+ provider Chef::Provider::Package::Dpkg
+
+ notifies :delete, resources(:file => path)
+ not_if "which ragel"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.