diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2014-12-09 17:27:54 -0800 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2014-12-09 17:27:54 -0800 |
commit | 261fe97a63316a4a4918afcaa6c8c0f4b0da45fc (patch) | |
tree | da0022d2cbe3a0700c02765a02e1be5a8b0c4f30 /ruby/Rakefile | |
parent | a0d9c59a7604139401cab78a27542b23f5724c19 (diff) | |
parent | 973f425725f1cc18211992792f2aed83d3d73831 (diff) | |
download | protobuf-261fe97a63316a4a4918afcaa6c8c0f4b0da45fc.tar.gz protobuf-261fe97a63316a4a4918afcaa6c8c0f4b0da45fc.tar.bz2 protobuf-261fe97a63316a4a4918afcaa6c8c0f4b0da45fc.zip |
Merge pull request #121 from cfallin/master
Provide a Ruby extension.
Diffstat (limited to 'ruby/Rakefile')
-rw-r--r-- | ruby/Rakefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ruby/Rakefile b/ruby/Rakefile new file mode 100644 index 00000000..b782b403 --- /dev/null +++ b/ruby/Rakefile @@ -0,0 +1,37 @@ +require "rake/extensiontask" +require "rake/testtask" + +spec = Gem::Specification.new do |s| + s.name = "protobuf" + s.version = "2.6.2" + s.licenses = ["BSD"] + s.summary = "Protocol Buffers" + s.description = "Protocol Buffers are Google's data interchange format." + s.authors = ["Protobuf Authors"] + s.email = "protobuf@googlegroups.com" + + s.files = ["lib/protobuf_c.so", "lib/protobuf.rb"] +end + +Rake::ExtensionTask.new("protobuf_c", spec) do |ext| + ext.lib_dir = "lib" + ext.config_script = "extconf.rb" +end + +Rake::TestTask.new(:test => :build) do |t| + t.test_files = FileList["tests/*.rb"] +end + +task :chmod do + File.chmod(0755, "lib/protobuf_c.so") +end + +Gem::PackageTask.new(spec) do |pkg| +end +task :package => :chmod +task :gem => :chmod + +task :build => [:clean, :compile] +task :default => [:build] + +# vim:sw=2:et |