-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
77 lines (68 loc) · 2.26 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# Copyright (C) 2011 Red Hat, Inc.
# Written by Jason Guiditta <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA. A copy of the GNU General Public License is
# also available at http://www.gnu.org/copyleft/gpl.html.
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'
require 'spec/rake/spectask'
require 'rake/rpmtask'
RPMBUILD_DIR = "#{File.expand_path('~')}/rpmbuild"
RPM_SPEC = "rubygem-imagefactory-console.spec"
spec = Gem::Specification.new do |s|
s.name = 'imagefactory-console'
s.version = '0.5.0'
s.has_rdoc = true
#s.extra_rdoc_files = ['README', 'COPYING']
s.summary = 'QMF Console for Aeolus Image Factory'
s.description = s.summary
s.author = 'Jason Guiditta'
s.email = '[email protected]'
# s.executables = ['your_executable_here']
s.files = %w(Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
s.require_path = "lib"
s.bindir = "bin"
end
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_tar = true
p.need_zip = true
end
Rake::RDocTask.new do |rdoc|
files =['lib/**/*.rb'] #'README', 'COPYING',
rdoc.rdoc_files.add(files)
#rdoc.main = "README" # page to start on
rdoc.title = "console Docs"
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
rdoc.options << '--line-numbers'
end
Rake::TestTask.new do |t|
t.test_files = FileList['test/**/*.rb']
end
Spec::Rake::SpecTask.new do |t|
t.libs << 'lib'
t.spec_files = FileList['spec/**/*.rb']
t.spec_opts = ['--color', '--format nested']
end
Rake::RpmTask.new(RPM_SPEC) do |rpm|
rpm.need_tar = true
rpm.package_files.include("lib/*")
rpm.topdir = "#{RPMBUILD_DIR}"
end