Skip to content

Instantly share code, notes, and snippets.

@kovyrin
Created April 9, 2010 06:10
Show Gist options
  • Save kovyrin/360927 to your computer and use it in GitHub Desktop.
Save kovyrin/360927 to your computer and use it in GitHub Desktop.
diff --git a/site-cookbooks/scribd_thrift/recipes/default.rb b/site-cookbooks/scribd_thrift/recipes/default.rb
index 9df8464..a374cb4 100644
--- a/site-cookbooks/scribd_thrift/recipes/default.rb
+++ b/site-cookbooks/scribd_thrift/recipes/default.rb
@@ -31,7 +31,7 @@ bash "checkout_thrift" do
cwd "/usr/src"
code <<-EOH
rm -rf thrift
- svn co http://svn.apache.org/repos/asf/incubator/thrift/trunk thrift
+ svn co http://svn.apache.org/repos/asf/incubator/thrift/branches/0.2.x thrift
EOH
not_if do
FileTest.exists?("/opt/thrift/bin/thrift") && FileTest.exists?("/opt/fb303")
@@ -45,7 +45,7 @@ bash "install_thrift" do
code <<-EOH
cp /usr/share/aclocal/pkg.m4 aclocal
sh bootstrap.sh
- ./configure --prefix=/opt/thrift --without-java --without-py --without-erlang --without-csharp --with-ruby
+ ./configure --prefix=/opt/thrift --without-java --without-py --without-erlang --without-csharp --without-ruby
make -j 2
make install
EOH
@@ -78,3 +78,17 @@ remote_file "/etc/ld.so.conf.d/thrift.conf" do
group 'root'
notifies :run, resources(:execute => "ldconfig"), :immediately
end
+
+# Install ruby gem
+gem_package 'thrift' do
+ version '0.2.0'
+ action :install
+end
+
+# Remove old thrift lib
+bash "remove-old-thrift" do
+ code <<-EOF
+ rm -rf /opt/ruby/lib/ruby/site_ruby/1.8/thrift*
+ rm -rf /opt/ruby/lib/ruby/site_ruby/1.8/x86_64-linux/thrift_native.so
+ EOF
+end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment