From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2003-04-07T14:27:02+09:00 Subject: Re: Call for standardized package installation procedure In article , wrote: >> From: Hal E. Fulton [mailto:hal9000@hypermetrics.com] >> I'll address these issues just from >> my own point of view. >> >> > I'd be interested to hear from folks as to: >> > a) Why they do not include an installation script >> >> First, I don't see the need for an install >> script if it's just a single file foo.rb >> which you do a require() on. > >I'm not so sure that every Ruby newbie knows where >to put such files. Seems so simple to have a script >that locates your site_ruby dir for you and copies >it over, unless there is a name conflict. > >Here's code that writes an install.rb script if all >you need is to copy a file to the site_dir: > Why do we have to copy 'setup.rb' or 'install.rb' at all? Why isn't there a standard module that has methods that support installation. My installpkg that I put on RAA back in December was intended to be a step in that direction and a catalyst for discussion. Using installpkg you write your own install.rb script which tends to be very simple and looks like: require 'install-pkg' include InstallPkg InstallPkg.install_pkg('RHDL') That's it for a package with no dependencies. If there are dependencies you can declare them in your install.rb and installpkg uses raa-install to go find the packages you need to install. I basically just took Aoki-san's install.rb and wrapped it in a module and added a couple of module methods - so it is a bit of a kludge, but it seems to work. I'm using installpkg for my RHDL package and I've heard from a few others that are using it as their package installer. Something like this should be included in the standard library. Phil