forked from whymirror/parkplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
63 lines (53 loc) · 1.7 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
include FileUtils
NAME = "parkplace"
VERSION = "0.7.22"
CLEAN.include ['**/.*.sw?', '*.gem', '.config']
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.add ['README', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
end
desc "Packages up Park Place."
task :default => [:package]
task :package => [:clean]
spec =
Gem::Specification.new do |s|
s.name = NAME
s.version = VERSION
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = [ "README" ]
s.summary = "a web file storage service, lovely with BitTorrent support."
s.description = s.summary
s.author = "why the lucky stiff"
s.executables = ['parkplace', 'parkseed']
s.add_dependency('mongrel', '>= 0.3.12.5')
s.add_dependency('camping', '>= 1.4.1')
s.add_dependency('sqlite3-ruby', '>=1.1.0')
s.add_dependency('rubytorrent', '>= 0.3')
s.required_ruby_version = '>= 1.8.4'
s.files = %w(COPYING README Rakefile) +
Dir.glob("{bin,doc,static,test,lib}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb")
s.require_path = "lib"
# s.extensions = FileList["ext/**/extconf.rb"].to_a
s.bindir = "bin"
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true
p.gem_spec = spec
end
task :install do
sh %{rake package}
sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
end
task :uninstall => [:clean] do
sh %{sudo gem uninstall mongrel}
end