aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-28 01:35:01 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-28 01:35:01 +0100
commit69aa4139b8f20f65e5bfc4184cf7b4cf45cbbb57 (patch)
treee1c3488a463f9636c94fb8afd2fc1c6f99a0bbd6
parentMerge branch 'upstream' into debian/sid (diff)
parentmention of rake (diff)
Merge branch 'upstream' into debian/sid
-rw-r--r--README52
l---------Rakefile2
l---------Rantfile2
-rw-r--r--rbuild (renamed from rinstall)236
4 files changed, 172 insertions, 120 deletions
diff --git a/README b/README
index 789f95e2..1742d410 100644
--- a/README
+++ b/README
@@ -138,16 +138,22 @@ They may be downloaded from:
Otherwise to install SiSU from source, check information at:
<http://www.jus.uio.no/sisu/SiSU/download.html#current>
-two alternative modes of installation from source are provided,
-setup.rb (by Minero Aoki) and a rant(by Stefan Lang) built install file,
-in either case: the first steps are the same, download and unpack the
-source file:
+alternative modes of installation from source are provided,
+setup.rb (by Minero Aoki),
+rake (by Jim Weirich) built install file,
+rant (by Stefan Lang) built install file,
+
+Ruby is the essential dependency for the basic operation of SiSU
1. Download the latest source (information available) from:
<http://www.jus.uio.no/sisu/SiSU/download.html#current>
2. Unpack the source
+Note however, that additional external package dependencies,
+such as texlive or postgresql should you desire to use it
+are not taken care of for you.
+
%% to use setup.rb
---------------
this is a three step process,
@@ -162,8 +168,30 @@ in the root directory of the unpacked SiSU as root type:
<http://i.loveruby.net/en/projects/setup/>
<http://i.loveruby.net/en/projects/setup/doc/usage.html>
+%% to use install (prapared with "Rake")
+---------------
+Rake must be installed on your system:
+ <http://rake.rubyforge.org/>
+ <http://rubyforge.org/frs/?group_id=50>
+
+in the root directory of the unpacked SiSU as root type:
+ rake
+
+or
+ rake base
+
+This makes use of Rake (by Jim Weirich) and the provided Rakefile
+
+For a list of alternative actions you may type:
+ rake help
+ rake -T
+
%% to use install (prapared with "Rant")
---------------
+(you may use the instructions above for rake substituting rant if rant is
+installed on your system, or you may use an independent installer created using
+rant as follows:)
+
in the root directory of the unpacked SiSU as root type:
ruby ./sisu-install
@@ -198,19 +226,23 @@ SiSU can make use of if available, (the use/requirement of some of which are
interdependent for specific actions by SiSU):
Package: sisu
-Depends: ruby (>= 1.8.4), libwebrick-ruby
+Architecture: all
+Depends: ruby (>= 1.8.2), libwebrick-ruby, unzip, zip
+Conflicts: vim-sisu, sisu-vim, sisu-remote
+Replaces: vim-sisu, sisu-vim
Recommends: sisu-pdf, sisu-sqlite, sisu-postgresql, librmagick-ruby, trang,
- tidy, librexml-ruby, zip, unzip, openssl, rsync, openssh-client | lsh-client,
- keychain, hyperestraier, kdissert
-Suggests: libfcgi-ruby1.8, rcs | cvs, lv, texinfo, pinfo, rename
+tidy, librexml-ruby, openssl, rsync, openssh-client | lsh-client, keychain,
+hyperestraier, kdissert, vim-addon-manager
+Suggests: rcs | cvs, lv, texinfo, pinfo
Package: sisu-complete
Depends: ruby (>= 1.8.4), sisu, sisu-pdf, sisu-postgresql, sisu-sqlite
Recommends: hyperestraier
Package: sisu-pdf
-Depends: sisu, tetex-bin | texlive-base-bin, tetex-extra | texlive-latex-extra,
- texlive-latex-extra, latex-ucs
+Architecture: all
+Depends: sisu, texlive-latex-base, texlive-fonts-recommended,
+texlive-latex-recommended, texlive-latex-extra
Suggests: evince, xpdf
Package: sisu-postgresql
diff --git a/Rakefile b/Rakefile
index 0bae78d7..3ace5013 120000
--- a/Rakefile
+++ b/Rakefile
@@ -1 +1 @@
-rinstall \ No newline at end of file
+rbuild \ No newline at end of file
diff --git a/Rantfile b/Rantfile
index 0bae78d7..3ace5013 120000
--- a/Rantfile
+++ b/Rantfile
@@ -1 +1 @@
-rinstall \ No newline at end of file
+rbuild \ No newline at end of file
diff --git a/rinstall b/rbuild
index 3fd3147d..a5d17478 100644
--- a/rinstall
+++ b/rbuild
@@ -1,7 +1,9 @@
#!/usr/bin/env ruby
raise 'Please, use ruby1.8.4 or later.' if RUBY_VERSION < '1.8.4'
=begin
- Rantfile installer for SiSU
+ Common Rakefile, Rantfile installer for SiSU
+ softlink Rakefile and Rantfile to this file
+
* Homepage: <http://www.jus.uio.no/sisu/SiSU>
<http://search.sisudoc.org>
* Download: <http://www.jus.uio.no/sisu/download>
@@ -14,12 +16,21 @@ raise 'Please, use ruby1.8.4 or later.' if RUBY_VERSION < '1.8.4'
* Ralph Amissah <ralph@amissah.com>
Ralph Amissah <ralph.amissah@gmail.com>
- Rant is a Ruby 'ant' by Stefan Lang
+ Rake is a Ruby build program by Jim Weirich
+ * Rake may be downloaded and installed from:
+ <http://rake.rubyforge.org/>
+
+ Rant is a Ruby build program by Stefan Lang
* Rant may be downloaded and installed from:
- http://make.rubyforge.org/
+ <http://make.rubyforge.org/>
Notes on use:
+ [if rake is preferred and installed]
+ rake -T
+ [if rant is preferred and installed]
rant -T
+ [else [if sisu-install is present]]
+ ruby sisu-install -T
SiSU can also be Setup/Installation using:
* Minero Aoki's setup.rb, provided along with SiSU, or
@@ -38,60 +49,63 @@ class Project_details
def name
'SiSU'
end
- def rant
- "Rantfile for the installation/setup of #{name}"
+ def rake_rant
+ "Rakefile/Rantfile for the installation/setup of #{name}"
end
def platform_notice
"[#{name} is for the Linux/Unix Platforms]"
end
- def dir_proj
- 'sisu'
- end
def env
Config::CONFIG
end
def host
env['host']
end
- def dir_arch
- env['archdir']
- end
- def dir_sitearch
- env['sitearchdir']
- end
- def dir_bin
- env['bindir']
- end
- def dir_lib
- env['sitelibdir']
- end
- def dir_data
- env['datadir']
- end
- def dir_share
- "#{env['datadir']}/sisu"
- end
- def dir_conf
- env['sysconfdir']
- end
- def dir_man
- env['mandir']
- end
- def dir_vim
- "#{env['datadir']}/sisu/vim"
- end
- def dir_out
- "#{env['localstatedir']}/#{dir_proj}"
- end
- def dir_rubylib
- env['LIBRUBYARG_SHARED']
- end
- def dir_pwd
- Dir.pwd #ENV['PWD']
+ def dir
+ def proj
+ 'sisu'
+ end
+ def arch
+ env['archdir']
+ end
+ def sitearch
+ env['sitearchdir']
+ end
+ def bin
+ env['bindir']
+ end
+ def lib
+ env['sitelibdir']
+ end
+ def data
+ env['datadir']
+ end
+ def share
+ "#{env['datadir']}/sisu"
+ end
+ def conf
+ env['sysconfdir']
+ end
+ def man
+ env['mandir']
+ end
+ def vim
+ "#{env['datadir']}/sisu/vim"
+ end
+ def out
+ "#{env['localstatedir']}/#{proj}"
+ end
+ def rubylib
+ env['LIBRUBYARG_SHARED']
+ end
+ def pwd
+ Dir.pwd #ENV['PWD']
+ end
+ self
end
def version
stamp={}
- v="#{dir_pwd}/conf/sisu/version.yml"
+ v="#{dir.pwd}/conf/sisu/version.yml"
version=if File.exist?(v)
stamp=YAML::load(File::open(v))
stamp[:version]
@@ -113,9 +127,14 @@ def answer?(ask)
end
end
def default_notice
- ans= %{#{@p.rant}
+ ans= %{#{@p.rake_rant}
Information on alternative actions is available using:
+ [if rake is installed:]
+ "rake help" or "rake -T"
+ [if rant is installed:]
"rant help" or "rant -T"
+ [else [if sisu-install is present]:]
+ "sisu-install help" or "sisu-install -T"
Default action selected - "install and to setup #{@p.name}" proceed? }
resp=answer?(ans)
exit unless resp
@@ -135,8 +154,8 @@ def chmod_util(place)
end
#%% using a directory and its mapping
def setup_find_create(dir_get,dir_put) #primary,
- Find.find("#{@p.dir_pwd}/#{dir_get}") do |f|
- stub=f.scan(/#{@p.dir_pwd}\/#{dir_get}\/(\S+)/).join
+ Find.find("#{@p.dir.pwd}/#{dir_get}") do |f|
+ stub=f.scan(/#{@p.dir.pwd}\/#{dir_get}\/(\S+)/).join
place="#{dir_put}/#{stub}"
action=case
when File.file?(f)
@@ -152,8 +171,8 @@ def setup_find_create(dir_get,dir_put) #primary,
end
end
def setup_find_cp_r(dir_get,dir_put) #secondary, using recursive copy
- Find.find("#{@p.dir_pwd}/#{dir_get}") do |f|
- stub=f.scan(/#{@p.dir_pwd}\/#{dir_get}\/(\S+)/).join
+ Find.find("#{@p.dir.pwd}/#{dir_get}") do |f|
+ stub=f.scan(/#{@p.dir.pwd}\/#{dir_get}\/(\S+)/).join
place="#{dir_put}/#{stub}"
case
when File.file?(f)
@@ -164,66 +183,67 @@ def setup_find_cp_r(dir_get,dir_put) #secondary, using rec
end
end
end
-def rant_system_info
+def system_info
puts <<WOK
#{@p.platform_notice}
Host
host: #{@p.host}
- arch: #{@p.dir_arch}
- sitearch: #{@p.dir_sitearch}
+ arch: #{@p.dir.arch}
+ sitearch: #{@p.dir.sitearch}
Directories for installation
- bin: #{@p.dir_bin}
- lib (site-ruby): #{@p.dir_lib}/#{@p.dir_proj}/v*
- conf [etc]: #{@p.dir_conf}/#{@p.dir_proj}
- data (odf, shared images): #{@p.dir_share}
- vim (vim syntax, highlighting, ftplugin): #{@p.dir_data}/sisu/vim
- data (README, version_manifest): #{@p.dir_data}/doc/#{@p.dir_proj}
- man (manual pages): #{@p.dir_man}
- output: #{@p.dir_out}
- processing: #{@p.dir_out}/processing
- www: #{@p.dir_out}/www
+ bin: #{@p.dir.bin}
+ lib (site-ruby): #{@p.dir.lib}/#{@p.dir.proj}/v*
+ conf [etc]: #{@p.dir.conf}/#{@p.dir.proj}
+ data (odf, shared images): #{@p.dir.share}
+ vim (vim syntax, highlighting, ftplugin): #{@p.dir.data}/sisu/vim
+ data (README, version_manifest): #{@p.dir.data}/doc/#{@p.dir.proj}
+ man (manual pages): #{@p.dir.man}
+ output: #{@p.dir.out}
+ processing: #{@p.dir.out}/processing
+ www: #{@p.dir.out}/www
- rubylib: #{@p.dir_rubylib}
+ rubylib: #{@p.dir.rubylib}
WOK
end
-def rant_project_help
+def project_help
puts <<WOK
#{@p.name}
- #{@p.rant}
+ #{@p.rake_rant}
#{@p.platform_notice}
Commands quick start list
- #{@p.name} Rant Help: (This Rantfile uses the same directory structure as setup.rb)
- rant -T # a task list, (generated by Rant) for more complete and up to date help
- rant system # system info used
+ #{@p.name} Rake/Rant Help: (This Rakefile or Rantfile uses the same directory structure as setup.rb)
+ rake -T or rant -T # a task list, (generated by Rake or Rant) for more complete and up to date help
+ rake system or rant system # system info used
Quick start install and remove project #{@p.name}
as root:
- rant # install #{@p.name}
+ rake or rant # install #{@p.name}
- rant setup # install #{@p.name} (without additonal configuration and generating of test file)
+ rake setup or rant setup # install #{@p.name} (without additonal configuration and generating of test file)
- rant reinstall # reinstall #{@p.name}
+ rake install or rant reinstall # reinstall #{@p.name}
- rant remove # clobber/remove #{@p.name}, current version: #{@p.version}
- rant remove_package # clobber/remove #{@p.name}, all versions
+ rake remove or rant remove # clobber/remove #{@p.name}, current version: #{@p.version}
+ rake remove_package or rant remove_package # clobber/remove #{@p.name}, all versions
For a more detailed and up to date list of command options use
+ rake -T
rant -T
WOK
end
-def rant_tasks
+def tasks
sys('rant -T')
end
#%% tasks
-desc "rant (as root type 'rant' for default action)"
+desc "rake/rant (as root type 'rake' or 'rant' for default action)"
task :default => [:default_notice,:project]
#task :default => [:help,:notice,:project]
desc "Setup/Install #{@p.name} and try generate a file"
@@ -327,18 +347,18 @@ task :system => [:system_info,:project_help,:post_install_note]
desc "show all system info available - parameters found"
task :system_param => [:system_param]
desc 'Help'
-task :help => [:project_help,:system_info,:rant_tasks]
+task :help => [:project_help,:system_info,:tasks]
#desc "Setup/Install #{@p.name} (uses filelist)"
task :install => [:default_notice,:project]
task :install_bin => [:setup_bin]
-desc '[make rant install file]'
+desc '[make rant independent install file]'
task :create_rant_independent_task_file => [:rant_independence]
#%% setup/install tasks
task :rant_independence do #notice
resp=''
while resp.length < 4
resp='sisu-install' #default name install
- print %{#{@p.rant}
+ print %{#{@p.rake_rant}
Create a rant dependency independent file
provide filename default name is "install"
[Warning, will overwrite file of name provided
@@ -357,60 +377,60 @@ end
task :default_notice do #notice
default_notice
end
-task :rant_default2 do #secondary
- setup_find_cp_r('bin',@p.dir_bin) if File.directory?('bin')
- setup_find_cp_r('lib',@p.dir_lib) if File.directory?('lib')
- setup_find_cp_r('conf',@p.dir_conf) if File.directory?('conf')
- setup_find_cp_r('data/sisu',@p.dir_share) if File.directory?('data/sisu') #
- setup_find_cp_r('data',@p.dir_data) if File.directory?('data')
- setup_find_cp_r('data/vim',"#{@p.dir_data}/vim") if File.directory?('data/vim')
- setup_find_cp_r('man',@p.dir_man) if File.directory?('man')
+task :default2 do #secondary
+ setup_find_cp_r('bin',@p.dir.bin) if File.directory?('bin')
+ setup_find_cp_r('lib',@p.dir.lib) if File.directory?('lib')
+ setup_find_cp_r('conf',@p.dir.conf) if File.directory?('conf')
+ setup_find_cp_r('data/sisu',@p.dir.share) if File.directory?('data/sisu') #
+ setup_find_cp_r('data',@p.dir.data) if File.directory?('data')
+ setup_find_cp_r('data/vim',"#{@p.dir.data}/vim") if File.directory?('data/vim')
+ setup_find_cp_r('man',@p.dir.man) if File.directory?('man')
end
task :setup_bin do #bin
- setup_find_create('bin',@p.dir_bin) if File.directory?('bin')
+ setup_find_create('bin',@p.dir.bin) if File.directory?('bin')
end
task :setup_lib do #lib
- setup_find_create('lib',@p.dir_lib) if File.directory?('lib')
+ setup_find_create('lib',@p.dir.lib) if File.directory?('lib')
end
task :setup_conf do #conf
- setup_find_create('conf',@p.dir_conf) if File.directory?('conf')
+ setup_find_create('conf',@p.dir.conf) if File.directory?('conf')
end
task :setup_share do #share
- setup_find_create('data/sisu',@p.dir_share) if File.directory?('data/sisu')
+ setup_find_create('data/sisu',@p.dir.share) if File.directory?('data/sisu')
end
task :setup_data do #data
- setup_find_create('data',@p.dir_data) if File.directory?('data')
+ setup_find_create('data',@p.dir.data) if File.directory?('data')
end
task :setup_man do #man
- setup_find_create('man',@p.dir_man) if File.directory?('man') #man pages
- setup_find_create('man.deb/man',@p.dir_man) if File.directory?('man.deb/man') #man pages
+ setup_find_create('man',@p.dir.man) if File.directory?('man') #man pages
+ setup_find_create('man.deb/man',@p.dir.man) if File.directory?('man.deb/man') #man pages
end
task :setup_vim do #man
- setup_find_create('data/vim',@p.dir_vim) if File.directory?('data/vim') #man pages
+ setup_find_create('data/vim',@p.dir.vim) if File.directory?('data/vim') #man pages
end
#%% post install
#%% clobber/remove tasks
task :remove_bin do
- rm_r "#{@p.dir_bin}/#{@p.dir_proj}" if FileTest.file?("#{@p.dir_bin}/#{@p.dir_proj}")
+ rm_r "#{@p.dir.bin}/#{@p.dir.proj}" if FileTest.file?("#{@p.dir.bin}/#{@p.dir.proj}")
end
task :remove_lib do
- rm_r "#{@p.dir_lib}/#{@p.dir_proj}" if FileTest.directory?("#{@p.dir_lib}/#{@p.dir_proj}")
+ rm_r "#{@p.dir.lib}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.lib}/#{@p.dir.proj}")
end
task :remove_conf do
- rm_r "#{@p.dir_conf}/#{@p.dir_proj}" if FileTest.directory?("#{@p.dir_conf}/#{@p.dir_proj}")
+ rm_r "#{@p.dir.conf}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.conf}/#{@p.dir.proj}")
end
task :remove_man do
- rm_r "#{@p.dir_man}/**/#{@p.dir_proj}" if FileTest.directory?("#{@p.dir_man}/man1/#{@p.dir_proj}")
+ rm_r "#{@p.dir.man}/**/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.man}/man1/#{@p.dir.proj}")
end
task :remove_version do
- rm_r "#{@p.dir_bin}/#{@p.dir_proj}" if FileTest.file?("#{@p.dir_bin}/#{@p.dir_proj}")
- rm_r "#{@p.dir_lib}/#{@p.dir_proj}/#{@p.version}" if FileTest.directory?("#{@p.dir_lib}/#{@p.dir_proj}/#{@p.version}")
- rm_r "#{@p.dir_conf}/#{@p.dir_proj} if FileTest.directory?("#{@p.dir_conf}/#{@p.dir_proj}")
+ rm_r "#{@p.dir.bin}/#{@p.dir.proj}" if FileTest.file?("#{@p.dir.bin}/#{@p.dir.proj}")
+ rm_r "#{@p.dir.lib}/#{@p.dir.proj}/#{@p.version}" if FileTest.directory?("#{@p.dir.lib}/#{@p.dir.proj}/#{@p.version}")
+ rm_r "#{@p.dir.conf}/#{@p.dir.proj} if FileTest.directory?("#{@p.dir.conf}/#{@p.dir.proj}")
end
task :remove_package do
- rm_r "#{@p.dir_bin}/#{@p.dir_proj}" if FileTest.file?("#{@p.dir_bin}/#{@p.dir_proj}")
- rm_r "#{@p.dir_lib}/#{@p.dir_proj}" if FileTest.directory?("#{@p.dir_lib}/#{@p.dir_proj}")
- rm_r "#{@p.dir_conf}/#{@p.dir_proj}" if FileTest.directory?("#{@p.dir_conf}/#{@p.dir_proj}")
+ rm_r "#{@p.dir.bin}/#{@p.dir.proj}" if FileTest.file?("#{@p.dir.bin}/#{@p.dir.proj}")
+ rm_r "#{@p.dir.lib}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.lib}/#{@p.dir.proj}")
+ rm_r "#{@p.dir.conf}/#{@p.dir.proj}" if FileTest.directory?("#{@p.dir.conf}/#{@p.dir.proj}")
end
task :post_install_note do
puts <<WOK
@@ -425,14 +445,14 @@ task :post_install_note do
WOK
end
task :system_info do #%% system info
- rant_system_info
+ system_info
end
task :system_param do
@env.each {|c| puts c.inspect }
end
task :project_help do #%% help
- rant_project_help
+ project_help
end
-task :rant_tasks do #%% help
- rant_tasks
+task :tasks do #%% help
+ tasks
end