| Index: third_party/protobuf/ruby/Rakefile
|
| diff --git a/third_party/protobuf/ruby/Rakefile b/third_party/protobuf/ruby/Rakefile
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c25103d819d1a422f78976a318ae0d016f462198
|
| --- /dev/null
|
| +++ b/third_party/protobuf/ruby/Rakefile
|
| @@ -0,0 +1,36 @@
|
| +require "rubygems"
|
| +require "rubygems/package_task"
|
| +require "rake/extensiontask" unless RUBY_PLATFORM == "java"
|
| +require "rake/testtask"
|
| +
|
| +spec = Gem::Specification.load("google-protobuf.gemspec")
|
| +
|
| +if RUBY_PLATFORM == "java"
|
| + if `which mvn` == ''
|
| + raise ArgumentError, "maven needs to be installed"
|
| + end
|
| + task :clean do
|
| + system("mvn clean")
|
| + end
|
| +
|
| + task :compile do
|
| + system("mvn package")
|
| + end
|
| +else
|
| + Rake::ExtensionTask.new("protobuf_c", spec) do |ext|
|
| + ext.ext_dir = "ext/google/protobuf_c"
|
| + ext.lib_dir = "lib/google"
|
| + end
|
| +end
|
| +
|
| +Gem::PackageTask.new(spec) do |pkg|
|
| +end
|
| +
|
| +Rake::TestTask.new(:test => :build) do |t|
|
| + t.test_files = FileList["tests/*.rb"]
|
| +end
|
| +
|
| +task :build => [:clean, :compile]
|
| +task :default => [:build]
|
| +
|
| +# vim:sw=2:et
|
|
|