forked from brianmario/bzip2-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
35 lines (27 loc) · 778 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'bundler'
Bundler::GemHelper.install_tasks
# rspec
begin
require 'rspec'
require 'rspec/core/rake_task'
desc "Run all examples with RCov"
RSpec::Core::RakeTask.new('spec:rcov') do |t|
t.rcov = true
end
RSpec::Core::RakeTask.new('spec') do |t|
t.verbose = true
end
task :default => :spec
rescue LoadError
puts "rspec, or one of its dependencies, is not available. Install it with: sudo gem install rspec"
end
# rake-compiler
require 'rake' unless defined? Rake
gem 'rake-compiler', '>= 0.7.5'
require "rake/extensiontask"
Rake::ExtensionTask.new('bzip2') do |ext|
ext.cross_compile = true
ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
ext.lib_dir = File.join 'lib', 'bzip2'
end
Rake::Task[:spec].prerequisites << :compile