-
Notifications
You must be signed in to change notification settings - Fork 28
/
Rakefile
45 lines (37 loc) · 1.09 KB
/
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
36
37
38
39
40
41
42
43
44
45
require "rake/clean"
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "yard"
require_relative "spec/env"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = "-t ~org"
end
YARD::Rake::YardocTask.new do |t|
t.options = []
end
CLEAN << VENDOR_ORG_MODE_DIR <<
"vendor/org-#{ORG_VERSION}"
CLOBBER << "vendor/org-#{ORG_VERSION}.tar.gz"
task :default => :spec
task :spec => :vendor_orgmode
task :vendor_orgmode => VENDOR_ORG_MODE_DIR
file VENDOR_ORG_MODE_DIR => "vendor/org-#{ORG_VERSION}" do |t|
mkdir_p File.expand_path("..", VENDOR_ORG_MODE_DIR)
ln_sf File.expand_path("vendor/org-#{ORG_VERSION}"), VENDOR_ORG_MODE_DIR
end
directory "vendor/org-#{ORG_VERSION}" => "vendor/org-#{ORG_VERSION}.tar.gz" do |t|
cd "vendor" do
sh "tar -xzf org-#{ORG_VERSION}.tar.gz"
end
cd "vendor/org-#{ORG_VERSION}" do
sh "make"
end
end
file "vendor/org-#{ORG_VERSION}.tar.gz" => "vendor" do |t|
cd "vendor" do
"http://orgmode.org/org-#{ORG_VERSION}.tar.gz".tap do |url|
sh "which wget && wget #{url} || curl -O #{url}"
end
end
end
directory "vendor"