Updated NEWS for 0.1.2.
[ruby-eet.git] / Rakefile
index 398615b22f47f17d1c0faa47176027123714d047..8471c516ea13372a52555be925f5168e34938fa3 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,10 +1,11 @@
-# $Id: Rakefile 6 2005-03-27 01:17:28Z tilman $
+# $Id: Rakefile 22 2005-04-09 16:18:02Z tilman $
 
 require "rbconfig"
 require "rake/clean"
 require "rake/testtask"
 require "rake/rdoctask"
 require "rake/packagetask"
+require "rake/contrib/compositepublisher"
 require "rake/contrib/sshpublisher"
 
 # make sure we run at least Rake 0.5.0
@@ -13,8 +14,8 @@ if (RAKEVERSION.split(".").map { |p| p.to_i } <=> [0, 5, 0]) < 0
 end
 
 PKG_NAME = "ruby-eet"
-PKG_VERSION = `grep VERSION lib/eet.rb`.match(/VERSION = \"(.*)\"/).
-              captures.first
+PKG_VERSION = File.read("lib/eet.rb").
+              match(/^\s*VERSION = \"(.*)\"\s$/).captures.first
 
 ext_obj = "ext/ext.o"
 ext_lib = "ext/eet_ext.so"
@@ -46,26 +47,26 @@ file ext_lib => ext_obj do |t|
 end
 
 task :install => [ext_lib] do |t|
-       d = destdir + sitearchdir
-
-       FileUtils::Verbose.install(ext_lib, d, :mode => 0755)
-       FileUtils::Verbose.install("lib/eet.rb", d, :mode => 0644)
+       FileUtils::Verbose.install(ext_lib, destdir + sitearchdir,
+                                  :mode => 0755)
+       FileUtils::Verbose.install("lib/eet.rb", destdir + sitelibdir,
+                                  :mode => 0644)
 end
 
 task :test => [ext_lib]
 
 Rake::TestTask.new do |t|
-       t.libs << "ext"
+       t.libs = ["lib", "ext", "test"]
        t.test_files = FileList["test/test_*.rb"]
        t.verbose = true
 end
 
 Rake::RDocTask.new do |t|
        t.rdoc_dir = "doc"
-       t.title = "ruby-eet - EET bindings for Ruby"
+       t.title = "Ruby-EET - EET bindings for Ruby"
        t.options = ["--line-numbers", "--inline-source", "--main", "README"]
        t.rdoc_files.include("README", "COPYING", "AUTHORS", "ChangeLog",
-                            "ext/ext.c", "lib/eet.rb")
+                            "NEWS", "ext/ext.c", "lib/eet.rb")
 end
 
 Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |t|