]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - Rakefile
recommit 33c336af346dc08b4f4f4951dd6eae7150cef481 po file per plugin
[user/henk/code/ruby/rbot.git] / Rakefile
1 require 'rubygems'
2 require 'rake'
3 require 'rake/gempackagetask'
4
5 task :default => [:repackage]
6
7 spec = Gem::Specification.new do |s|
8   s.name = 'rbot'
9   s.version = '0.9.11'
10   s.summary = <<-EOF
11     A modular ruby IRC bot.
12   EOF
13   s.description = <<-EOF
14     A modular ruby IRC bot specifically designed for ease of extension via plugins.
15   EOF
16   s.requirements << 'Ruby, version 1.8.0 (or newer)'
17
18   #  s.files = Dir.glob("**/*").delete_if { |item| item.include?(".svn") }
19   s.files = FileList['lib/**/*.rb', 'bin/*', 'data/**/*', 'AUTHORS', 'COPYING', 'README', 'REQUIREMENTS', 'TODO', 'ChangeLog', 'INSTALL',  'Usage_en.txt', 'setup.rb'].to_a.delete_if {|item| item == ".svn"}
20   s.executables << 'rbot'
21
22 #  s.autorequire = 'rbot/ircbot'
23   s.has_rdoc = true
24   s.rdoc_options = ['--exclude', 'post-install.rb',
25   '--title', 'rbot API Documentation', '--main', 'README', 'README']
26
27   s.author = 'Tom Gilbert'
28   s.email = 'tom@linuxbrit.co.uk'
29   s.homepage = 'http://ruby-rbot.org'
30   s.rubyforge_project = 'rbot'
31 end
32
33 Rake::GemPackageTask.new(spec) do |pkg|
34   pkg.need_zip = true
35   pkg.need_tar = true
36 end
37
38 desc "Update pot/po files."
39 task :updatepo do
40   require 'gettext/utils'
41   plugin_files = Dir.glob('data/rbot/plugins/**/*.rb')
42   # all except plugin files use the rbot textdomain
43   GetText.update_pofiles("rbot",
44     Dir.glob("{lib,bin,data}/**/*.{rb,rhtml}") - plugin_files, "rbot")
45   # each plugin uses its own textdomain
46   plugin_files.each do |f|
47     basename = File.basename(f, '.rb')
48     GetText.update_pofiles("rbot-#{basename}", f, 'rbot')
49   end
50 end
51
52 desc "Create mo-files"
53 task :makemo do
54   require 'gettext/utils'
55   GetText.create_mofiles(true)
56 end