setup.rb User Manual

What is setup.rb ?

setup.rb is the installer for (mainly) ruby scripts, and ruby extentions. You can automate installation and configuration of your program package with this script.

Usage (for developper)

Construct directories like:

package-top/
  setup.rb
  lib/
    [packages...]/
    PATHCONV
  ext/
    [packages...]/
    PATHCONV
  bin/
    [packages...]/
    PATHCONV
  share/
    [packages...]/
    PATHCONV
All lib/, ext/, bin/, share/ directories are optional. You only have to ensure that, at least, one of them is exist.

lib/ is directory for ruby scripts. ext/ is for ruby extentions, bin/ is for command, share/ is for data file (ex. images, resource files...).

PATHCONV defines packages and install target. PATHCONV file format is like:

dir-name package-name target-dir
dir-name package-name target-dir
              :
DIR-NAME is the directory name under lib/, ext/, etc. PACKAGE-NAME is the package name each directory belonging to. TARGET-DIR is the directory path to install its files. TARGET-DIR is the absolute path from "standard path", ex. "/usr/local/lib/ruby/site_ruby/1.5/" for library. For example, one your program is loaded like "require 'mylib/worder'", TARGET-DIR is 'mylib'. Or, "require 'worker'", TARGET-DIR is '.'. Here is an example that I'm using actually.
mails tmail tmail
cparse raccrt racc
strscan strscan .
cparse/ includes "cparse.so" extention, but it belongs to "raccrt" package. And "cparse.so" is installed to RUBYLIB/racc/cparse.so .

Usage for REAL user

see "ruby setup.rb --help"

License

GNU General Public License (GPL) version 2. For details, see file "GPL".


Copyright (c) 2000,2001 Minero Aoki <aamine@cd.xdsl.ne.jp>