Skip to content
This repository
Newer
Older
100644 177 lines (122 sloc) 3.462 kb
e1e28290 »
2008-10-24 Updated Rakefile, added license for it.
1 #
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
2 # This is the Rakefile for Rubygame. It's used for packaging,
d052920d »
2009-10-18 Updated Rakefile. Version is 2.5.99 for test release.
3 # installing, generating the documentation, and running specs.
e1e28290 »
2008-10-24 Updated Rakefile, added license for it.
4 #
94dbeedf »
2008-05-18 Moved the version number up to the top of the Rakefile for easy editi…
5
6
7 # The version number for Rubygame.
a15e3726 »
2010-04-16 Rubygame 2.6.4 released.
8 # If you update this, also update lib/rubygame/main.rb.
9 RUBYGAME_VERSION = [2,6,4]
94dbeedf »
2008-05-18 Moved the version number up to the top of the Rakefile for easy editi…
10
11
12
7e5aed54 »
2006-01-15 - Rakefile:
13 require 'rubygems'
14
15 require 'rake'
16 require 'rake/gempackagetask'
17 require 'rake/rdoctask'
18
828cb081 »
2007-03-20 Merge changes from newbuild branch -r186:194 into trunk.
19 require "rbconfig"
20 include Config
9d2e5d4f »
2007-04-20 Check ENV for CFLAGS, etc. in addition to CONFIG (helps win32 compile).
21
83288e9b »
2007-12-16 Rakefile will complain loudly and exit with error if compile fails.
22
9d2e5d4f »
2007-04-20 Check ENV for CFLAGS, etc. in addition to CONFIG (helps win32 compile).
23
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
24 #######
25 # GEM #
26 #######
828cb081 »
2007-03-20 Merge changes from newbuild branch -r186:194 into trunk.
27
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
28 gem_spec = Gem::Specification.new do |s|
bc12ecfd »
2006-02-04 - Rakefile:
29 s.name = "rubygame"
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
30 s.version = RUBYGAME_VERSION.join(".")
bc12ecfd »
2006-02-04 - Rakefile:
31 s.author = "John Croisant"
e1e28290 »
2008-10-24 Updated Rakefile, added license for it.
32 s.email = "jacius@gmail.com"
33 s.homepage = "http://rubygame.org/"
828cb081 »
2007-03-20 Merge changes from newbuild branch -r186:194 into trunk.
34 s.summary = "Clean and powerful library for game programming"
163573aa »
2009-05-12 Gem spec in Rakefile sets spec.rubyforge_project.
35 s.rubyforge_project = "rubygame"
bc12ecfd »
2006-02-04 - Rakefile:
36
30f5eafe »
2007-12-08 Improved how Rakefile finds files to package and/or rdoc.
37 s.files = FileList.new do |fl|
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
38 fl.include("{lib,samples,doc}/**/*")
bc12ecfd »
2006-02-04 - Rakefile:
39 end
40
ef46b7a3 »
2010-04-15 Fixed a gem require_path problem that interefered with ruby-opengl. […
41 s.require_paths = ["lib"]
bc12ecfd »
2006-02-04 - Rakefile:
42
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
43 s.has_rdoc = true
30f5eafe »
2007-12-08 Improved how Rakefile finds files to package and/or rdoc.
44 s.extra_rdoc_files = FileList.new do |fl|
45 fl.include "doc/*.rdoc"
f96a42fc »
2007-12-19 Renamed Changelog -> NEWS, TODO -> ROADMAP.
46 fl.include "README", "LICENSE", "CREDITS", "ROADMAP", "NEWS"
30f5eafe »
2007-12-08 Improved how Rakefile finds files to package and/or rdoc.
47 end
af9014b6 »
2009-06-14 Updated Rakefile to list dependencies and requirements.
48
49 s.required_ruby_version = ">= 1.8"
50 s.add_dependency( "rake", ">=0.7.0" )
d052920d »
2009-10-18 Updated Rakefile. Version is 2.5.99 for test release.
51 s.add_dependency( "ruby-sdl-ffi", ">=0.1.0" )
af9014b6 »
2009-06-14 Updated Rakefile to list dependencies and requirements.
52 s.requirements = ["SDL >= 1.2.7",
53 "SDL_gfx >= 2.0.10 (optional)",
54 "SDL_image >= 1.2.3 (optional)",
55 "SDL_mixer >= 1.2.7 (optional)",
56 "SDL_ttf >= 2.0.6 (optional)"]
57
53a7221d »
2007-06-30 Merged changes in branches/prerelease-2.0.1 (r376:414, excepting r409…
58 end
59
7e5aed54 »
2006-01-15 - Rakefile:
60
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
61 Rake::GemPackageTask.new(gem_spec) do |pkg|
7e5aed54 »
2006-01-15 - Rakefile:
62 pkg.need_tar_bz2 = true
63 end
64
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
65
66
67 ########
68 # RDOC #
69 ########
70
7e5aed54 »
2006-01-15 - Rakefile:
71 Rake::RDocTask.new do |rd|
098089db »
2007-04-21 Tweak RDoc settings
72 rd.main = "README"
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
73 rd.title = "Rubygame #{RUBYGAME_VERSION.join(".")} Docs"
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
74 rd.rdoc_files.include("lib/rubygame/**/*.rb",
99e041e3 »
2007-04-15 Give better info/feedback to the user
75 "doc/*.rdoc",
53a7221d »
2007-06-30 Merged changes in branches/prerelease-2.0.1 (r376:414, excepting r409…
76 "README",
77 "LICENSE",
78 "CREDITS",
f96a42fc »
2007-12-19 Renamed Changelog -> NEWS, TODO -> ROADMAP.
79 "ROADMAP",
80 "NEWS")
7e5aed54 »
2006-01-15 - Rakefile:
81 end
82
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
83
84
85 #########
86 # CLEAN #
87 #########
828cb081 »
2007-03-20 Merge changes from newbuild branch -r186:194 into trunk.
88
89 require 'rake/clean'
99e041e3 »
2007-04-15 Give better info/feedback to the user
90 task(:clean) { puts "Cleaning out temporary generated files" }
91 task(:clobber) { puts "Cleaning out final generated files" }
92
1c902e0f »
2007-12-07 Replacing Rakefile option handling (2 of 2)
93
94
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
95 ###########
96 # INSTALL #
97 ###########
1c902e0f »
2007-12-07 Replacing Rakefile option handling (2 of 2)
98
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
99 task :install do |task|
100 sitelibdir = (ENV["RUBYLIBDIR"] or CONFIG["sitelibdir"])
65169e5a »
2007-04-15 More flexible system; extensions don't link to unneeded libs now
101
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
102 puts "Installing to #{sitelibdir}"
ddc058c5 »
2007-12-18 Smarter installing of library files.
103
104 files = FileList.new do |fl|
105 fl.include("lib/**/*.rb")
106 end
107
108 files.each do |f|
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
109 dir = File.join(sitelibdir, File.dirname(f).sub('lib',''), "")
ddc058c5 »
2007-12-18 Smarter installing of library files.
110 mkdir_p dir
111 cp f, dir
112 end
828cb081 »
2007-03-20 Merge changes from newbuild branch -r186:194 into trunk.
113 end
7e5aed54 »
2006-01-15 - Rakefile:
114
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
115
116
e6f8beff »
2008-06-19 Added spec namespace and spec:all task (same as spec task).
117 #########
118 # SPECS #
119 #########
120
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
121 begin
122 require 'spec/rake/spectask'
123
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
124
e6f8beff »
2008-06-19 Added spec namespace and spec:all task (same as spec task).
125 desc "Run all specs"
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
126 Spec::Rake::SpecTask.new do |t|
b5a3902c »
2008-06-18 Updated Rakefile to know where to look for specs.
127 t.spec_files = FileList['spec/*_spec.rb']
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
128 end
e6f8beff »
2008-06-19 Added spec namespace and spec:all task (same as spec task).
129
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
130
e6f8beff »
2008-06-19 Added spec namespace and spec:all task (same as spec task).
131 namespace :spec do
132 desc "Run all specs"
133 Spec::Rake::SpecTask.new(:all) do |t|
134 t.spec_files = FileList['spec/*_spec.rb']
135 end
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
136
137 desc "Run spec/[name]_spec.rb (e.g. 'color')"
138 task :name do
139 puts( "This is just a stand-in spec.",
140 "Run rake spec:[name] where [name] is e.g. 'color', 'music'." )
141 end
142 end
143
144
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
145 rule(/spec:.+/) do |t|
146 name = t.name.gsub("spec:","")
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
147
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
148 path = File.join( File.dirname(__FILE__),'spec','%s_spec.rb'%name )
3e5f63bc »
2008-06-19 Check for file before running spec.
149
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
150 if File.exist? path
151 Spec::Rake::SpecTask.new(name) do |t|
152 t.spec_files = [path]
153 end
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
154
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
155 puts "\nRunning spec/%s_spec.rb"%name
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
156
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
157 Rake::Task[name].invoke
158 else
159 puts "File does not exist: %s"%path
160 end
e6f8beff »
2008-06-19 Added spec namespace and spec:all task (same as spec task).
161
9746da78 »
2009-07-25 Drastically pruned and updated Rakefile.
162 end
3e5f63bc »
2008-06-19 Check for file before running spec.
163
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
164 rescue LoadError
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
165
166 error = "ERROR: RSpec is not installed?"
167
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
168 task :spec do
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
169 puts error
170 end
171
172 rule( /spec:.*/ ) do
173 puts error
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
174 end
81ebefed »
2008-06-19 Added spec:[name] rule to run spec/[name]_spec.rb.
175
304afe87 »
2008-05-17 Copied over Rakefile from trunk (but changed version number).
176 end
Something went wrong with that request. Please try again.