From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-12-14T07:53:14+09:00 Subject: ANN: installpkg 0.0.1 I just listed installpkg on the RAA. It's available here: www.aracnet.com/~ptkwt/ruby_stuff/InstallPkg/installpkg-0.0.1.tgz No, it's not another package management system, it's meant to work closely with raa-install. See the thread I started yesterday for some background: ([RCR] replace setup.rb/install.rb with builtin mobule). From the README: This is the preliminary release of install-pkg which provides the InstallPkg module. The InstallPkg module allows you to easily build install scripts for your own packages - your install script should always be called 'install.rb' for compatability with packaging tools (like raa-install) and for consistency. Who is this for?: If you want to easily create installation scripts for your own packages, this package is for you. What's it good for?: It makes the process of creating installation scripts a bit more uniform. It also has the added benefit of allowing you to easily create installation scripts which can download and install packages that your package might depend on (using raa-install). It will (hopefully) provide a common API creating installation scripts and (also hopefully) allow for code reuse. Note: this release is a bit of a kludge - I took Minero Aoki's install.rb script and wrapped the classes he defined there in the namespace 'InstallPkg'. Aoki-san's install.rb script takes a number of commandline options; three of these are actions: config, setup and install. I changed it so that now config, setup and install are always run so there is no need for users of. your install.rb to specify them. You can also have commandline options for your install.rb file which are the same as the '--' prefixed options for Aoki-san's install.rb (see his docs for details). Most notably, users of your install.rb files will still be able to use the '--prefix' option to specify alternative installation areas. Requirements: ------------- * ruby 1.6.*, 1.7.* * raa-install (for installing dependencies, otherwise you won't need it) Install: -------- $ su # ruby install.rb Usage: The simplest way to use the InstallPkg module is to create a file called install.rb which contains: require 'install-pkg' include InstallPkg package_name = "foo" InstallPkg.install_pkg(package_name) Then to install your package, the user only has to do: $ su # ruby install.rb If your package has some dependencies then you would want to create an install.rb file which looks like: require 'install-pkg' include InstallPkg depends_on = { 'jabber4r'=>'0.1.0', 'rexml' => '0.5.0'} InstallPkg.install_pkg_with_dependencies("foo",depends_on) Notice that depends_on is a hash whose keys are package names (from the RAA) and the values associated with the package names are version numbers for the package. (NOTE:Currently the version numbers do nothing) Again to install your package with dependencies the user only has to do: $ su # ruby install.rb This time, however, since 'install_pkg_with_dependencies' was specified in your install.rb file, raa-install will first be used to install the packages you specified in the 'depends_on' hash. Currently, install_pkg and install_pkg_with_dependencies are the only two module methods in InstallPkg. There will probably be others added in the future. License: Same as Aoki-san's install.rb (LGPL) -- "Or perhaps the truth is less interesting than the facts?" Amy Weiss (accusing theregister.co.uk of engaging in 'tabloid journalism') Senior VP, Communications Recording Industry Association of America