about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-08-28 20:47:43 -0700
committerEric Wong <normalperson@yhbt.net>2009-08-28 20:48:10 -0700
commita70468036d9b780bc7ec921f7feb6e1275778169 (patch)
tree302c8b4f4a30203c9549dbd7579006a729c1830f /Rakefile
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..d1dcf85
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,30 @@
+require 'hoe'
+$LOAD_PATH << 'lib'
+require 'clogger'
+begin
+  require 'rake/extensiontask'
+  Rake::ExtensionTask.new('clogger_ext')
+rescue LoadError
+  warn "rake-compiler not available, cross compiling disabled"
+end
+
+common = lambda do |hoe|
+  title = hoe.paragraphs_of("README.txt", 0).first.sub(/^= /, '')
+  hoe.version = Clogger::VERSION
+  hoe.summary = title.split(/\s*-\s*/, 2).last
+  hoe.description = hoe.paragraphs_of("README.txt", 3)
+  hoe.rubyforge_name = 'clogger'
+  hoe.author = 'Eric Wong'
+  hoe.email = 'clogger@librelist.com'
+  hoe.spec_extras.merge!('rdoc_options' => [ "--title", title ])
+  hoe.remote_rdoc_dir = ''
+end
+
+if ENV['CLOGGER_EXT']
+  Hoe.spec('clogger_ext') do
+    common.call(self)
+    self.spec_extras.merge!(:extensions => Dir.glob('ext/*/extconf.rb'))
+  end
+else
+  Hoe.spec('clogger') { common.call(self) }
+end