3 require 'rake/gempackagetask'
4 require 'rake/rdoctask'
10 CLEAN.include ['**/.*.sw?', '*.gem', '.config']
12 spec = Gem::Specification.new do |s|
15 s.platform = Gem::Platform::RUBY
17 s.extra_rdoc_files = ["README", "ChangeLog.git", "COPYING"]
18 s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)\/', '--exclude', 'lib/camping.rb']
19 s.summary = 'rubygems ebuild generator'
20 s.description = s.summary
21 s.author = 'Nguyễn Thái Ngọc Duy'
22 s.email = 'pclouds@gentoo.org'
23 s.homepage = 'http://dev.gentoo.org/~pclouds/g-gem'
24 s.executables = ['g-gem']
26 s.required_ruby_version = '>= 1.8.2'
28 s.files = %w(COPYING README ChangeLog.git) +
29 Dir.glob("{bin,doc/rdoc,test,lib,extras}/**/*") +
30 Dir.glob("ext/**/*.{h,c,rb}") +
31 Dir.glob("examples/**/*.rb") +
32 Dir.glob("tools/*.rb")
34 s.require_path = "lib"
38 task :default => [:package]
39 task :package => ['ChangeLog.git', :clean]
41 Rake::GemPackageTask.new(spec) do |p|
46 task 'ChangeLog.git' do |t|
47 f = File.open(t.name, 'w')
48 f.write(%x(git log --no-color --stat))