summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile48
1 files changed, 27 insertions, 21 deletions
diff --git a/Rakefile b/Rakefile
index 11c2d71..c979c8a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,6 +5,7 @@ require 'rake'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
+require 'rake/extensiontask'
GEM_NAME = "libyajl2"
@@ -18,27 +19,32 @@ end
# build tasks
#
-desc "repackage and install #{GEM_NAME}-#{Libyajl2::VERSION}.gem"
-task :install => :repackage do
- sh %{gem install pkg/#{GEM_NAME}-#{Libyajl2::VERSION}.gem --no-rdoc --no-ri}
-end
-
-desc "uninstall #{GEM_NAME}-#{Libyajl2::VERSION}.gem"
-task :uninstall do
- sh %{gem uninstall #{GEM_NAME} -x -v #{Libyajl2::VERSION} }
-end
-
-desc "compile native gem"
-task :compile do
- cd "ext/libyajl2"
- ruby "extconf.rb"
-end
-
-desc "clean the git repo"
-task :clean do
- sh "git clean -fdx"
- cd "ext/libyajl2/vendor/yajl"
- sh "git clean -fdx"
+#desc "repackage and install #{GEM_NAME}-#{Libyajl2::VERSION}.gem"
+#task :install => :repackage do
+# sh %{gem install pkg/#{GEM_NAME}-#{Libyajl2::VERSION}.gem --no-rdoc --no-ri}
+#end
+#
+#desc "uninstall #{GEM_NAME}-#{Libyajl2::VERSION}.gem"
+#task :uninstall do
+# sh %{gem uninstall #{GEM_NAME} -x -v #{Libyajl2::VERSION} }
+#end
+#
+#desc "compile native gem"
+#task :compile do
+# cd "ext/libyajl2"
+# ruby "extconf.rb"
+#end
+#
+#desc "clean the git repo"
+#task :clean do
+# sh "git clean -fdx"
+# cd "ext/libyajl2/vendor/yajl"
+# sh "git clean -fdx"
+#end
+
+Rake::ExtensionTask.new('libyajl', gemspec) do |ext|
+ ext.lib_dir = 'lib/libyajl2/vendored-libyajl2'
+ ext.ext_dir = 'ext/libyajl2'
end
# FIXME: need a rake task to update the git submodule and need to do that before shipping