3 require 'rake/gempackagetask'
5 task :default => [:repackage]
7 spec = Gem::Specification.new do |s|
11 A modular ruby IRC bot.
13 s.description = <<-EOF
14 A modular ruby IRC bot specifically designed for ease of extension via plugins.
16 s.requirements << 'Ruby, version 1.8.0 (or newer)'
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'
22 # s.autorequire = 'rbot/ircbot'
24 s.rdoc_options = ['--exclude', 'post-install.rb',
25 '--title', 'rbot API Documentation', '--main', 'README', 'README']
27 s.author = 'Tom Gilbert'
28 s.email = 'tom@linuxbrit.co.uk'
29 s.homepage = 'http://ruby-rbot.org'
30 s.rubyforge_project = 'rbot'
33 Rake::GemPackageTask.new(spec) do |pkg|
38 desc "Update pot/po files."
40 # ruby-gettext treats empty output from msgmerge as error, causing this task to
41 # fail. we provide a wrapper to work around it. see bin/msgmerge-wrapper.rb for
43 ENV['REAL_MSGMERGE_PATH'] = ENV['MSGMERGE_PATH']
44 ENV['MSGMERGE_PATH'] = 'bin/msgmerge-wrapper.rb'
46 require 'gettext/utils'
47 plugin_files = Dir.glob('data/rbot/plugins/**/*.rb')
48 # all except plugin files use the rbot textdomain
49 GetText.update_pofiles("rbot",
50 Dir.glob("{lib,bin,data}/**/*.{rb,rhtml}") - plugin_files, "rbot")
51 # each plugin uses its own textdomain
52 plugin_files.each do |f|
53 basename = File.basename(f, '.rb')
54 GetText.update_pofiles("rbot-#{basename}", f, 'rbot')
58 desc "Create mo-files"
60 require 'gettext/utils'
61 GetText.create_mofiles(true)