Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

redhat packaging for node

  • Loading branch information...
commit 82c9a69ff74a7a03313d929a3fa6d90ce1ffad6e 1 parent dcb2a9d
@smith smith authored
Showing with 19 additions and 3 deletions.
  1. +19 −3 nodejs/recipes/default.rb
View
22 nodejs/recipes/default.rb
@@ -19,9 +19,23 @@
#
case node[:platform]
- when "centos","redhat","fedora","debian"
- include_recipe 'nodejs::source'
- when "ubuntu"
+ when 'centos', 'redhat', 'scientific'
+ file = '/usr/local/src/nodejs-stable-release.noarch.rpm'
+
+ remote_file file do
+ source 'http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm'
+ action :create_if_missing
+ end
+
+ yum_package 'nodejs-stable-release' do
+ source file
+ options '--nogpgcheck'
+ end
+
+ %w{ nodejs nodejs-compat-symlinks npm }.each do |pkg|
+ package pkg
+ end
+ when 'ubuntu'
apt_repository 'node.js' do
uri 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu'
distribution node['lsb']['codename']
@@ -34,4 +48,6 @@
%w{ nodejs npm }.each do |pkg|
package pkg
end
+ else
+ include_recipe 'nodejs::source'
end
Please sign in to comment.
Something went wrong with that request. Please try again.