Rakefile is ready for Linux. Yahoo!
This commit is contained in:
parent
77411674d7
commit
a69c617f0d
10
README
10
README
|
@ -17,12 +17,14 @@ Dependencies
|
|||
|
||||
Also you'll need GNU C Compiler, bash and GNU make for building.
|
||||
|
||||
Building
|
||||
========
|
||||
Installing
|
||||
==========
|
||||
|
||||
Typically you just can use the following command:
|
||||
Typically you just can use the following command (as root):
|
||||
|
||||
rake --silent
|
||||
rake install --silent
|
||||
|
||||
It works even on Windows.
|
||||
|
||||
You can use "rake -T" to see list of available build options.
|
||||
|
||||
|
|
71
Rakefile
71
Rakefile
|
@ -1,7 +1,7 @@
|
|||
task :default => 'build:linux'
|
||||
|
||||
require 'rake/clean'
|
||||
verbose(false)
|
||||
#verbose(false)
|
||||
|
||||
VERSION = "1.0"
|
||||
|
||||
|
@ -161,44 +161,51 @@ namespace :build do
|
|||
end
|
||||
end
|
||||
|
||||
namespace :install do
|
||||
desc "Install Steed (linux)"
|
||||
task :linux do
|
||||
directory "#{$prefix}/share/doc/steed/"
|
||||
directory "#{$prefix}/bin"
|
||||
directory "#{$prefix}/share/steed"
|
||||
directory "#{$prefix}/share/man/man6"
|
||||
|
||||
task :man => "#{$prefix}/share/man/man6" do
|
||||
Dir.chdir("doc") do
|
||||
FileList["*.6"].each do |file|
|
||||
cp file, "#{$prefix}/share/man/man6"
|
||||
end
|
||||
end
|
||||
end
|
||||
task :data => "#{$prefix}/share/steed" do
|
||||
FileList["lang/*.ini", "stead/*.lua", "themes/*/*.(ini|jpg|png|ogg|wav|ttf)"].each do |file|
|
||||
cp file,"#{$prefix}/share/steed"
|
||||
end
|
||||
end
|
||||
task :steed => "#{$prefix}/bin" do #if I do that as file task it thinks it's already done
|
||||
cp "src/steed/steed", "#{$prefix}/bin"
|
||||
File.chmod(0755, "#{$prefix}/bin/steed")
|
||||
end
|
||||
task :doc => "#{$prefix}/share/doc/steed/" do
|
||||
Dir.chdir("doc") do
|
||||
FileList["modules/*.txt","*.html", "*.txt", "*.pdf"].each do |file|
|
||||
cp file, "#{$prefix}/share/doc/steed/"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "Install Steed"
|
||||
task :install do
|
||||
$cflags.unshift("-g -Wall")
|
||||
if (RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i) then
|
||||
print "Enter prefix path [/usr]:"
|
||||
$prefix = STDIN.gets.chomp
|
||||
if (!$prefix) then $prefix = "/usr" end
|
||||
$cflags.unshift("-g -Wall")
|
||||
if ($prefix.empty?) then $prefix = "/usr" end
|
||||
$cflags.unshift("-Dunix")
|
||||
$cflags.push(%Q!-DLANG_PATH='"#{$prefix}/share/steed/lang"' -DSTEAD_PATH='"#{$prefix}/share/steed/stead"' -DGAMES_PATH='"#{$prefix}/share/steed/games"' -DTHEMES_PATH='"#{$prefix}/share/steed/themes"' -DVERSION='"#{VERSION}"' -DICON_PATH='"#{$prefix}/share/pixmaps"'!)
|
||||
#next are parallel
|
||||
Rake::Task["#{$prefix}/share/man/man6"].invoke
|
||||
Rake::Task["#{$prefix}/share/steed"].invoke
|
||||
Rake::Task["#{$prefix}/bin"].invoke
|
||||
Rake::Task["#{$prefix}/share/doc/steed/"].invoke
|
||||
Rake::Task["doc"].invoke
|
||||
Rake::Task["data"].invoke
|
||||
Rake::Task["steed"].invoke
|
||||
Rake::Task["man"].invoke
|
||||
puts "Installation complete."
|
||||
end
|
||||
Directory "#{$prefix}/share/man/man6" do
|
||||
Dir.chdir("doc") do
|
||||
FileList["*.6"].each do |file|
|
||||
cp file, "#{$prefix}/share/man/man6"
|
||||
end
|
||||
end
|
||||
end
|
||||
Directory "#{$prefix}/share/steed" do
|
||||
FileList["lang/*.ini", "stead/*.lua", "themes/*/*.(ini|jpg|png|ogg|wav|ttf)"].each do |file|
|
||||
cp file,"#{$prefix}/share/steed"
|
||||
end
|
||||
end
|
||||
Directory "#{$prefix}/bin" do
|
||||
cp "src/steed/steed", "#{$prefix}/bin"
|
||||
end
|
||||
Directory "#{$prefix}/share/doc/steed/" do
|
||||
Dir.chdir("doc") do
|
||||
FileList["modules/*.txt","*.html", "*.txt", "*.pdf"].each do |file|
|
||||
cp file, "#{$prefix}/share/doc/steed/"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
namespace :test do
|
||||
|
|
Loading…
Reference in a new issue