From: "T. Onoma" Date: 2004-08-28T21:03:22+09:00 Subject: Re: Install to bin dir? Funny, two years ago the big names on the block were raainstall and rpkg. Remember those? Now we have RubyGems and RPA. Did we just long for capital letters in our packaging systems' titles, or have we really gained better systems? :) All kidding aside, has ruby-land improved? On Saturday 28 August 2004 05:26 am, Mauricio Fern�ndez wrote: > IMHO it's still the most comfortable/best general way to create installers > (not "packages") for Ruby libs/apps; it is also repackager-friendly and > promotes good development practices regarding source code structure. > It handles extensions, data dirs... without any problem. Ruby-land would > be a better place if everybody used setup.rb instead of custom installers. Curious. I've looked it over some. It looks pretty complete (much larger then install.rb, that's for sure). But, if it is as good as you suggest (and, mind you, I do not doubt you are quite correct), I wonder why it has never been bundled with Ruby? Then I think, maybe it would be except it doesn't lend itself to being used as a library (i.e. you have to copy and paste it into your directory.) That may well be the case. Thankfully, it is now potentially correctable with Rake. > I'm not sure I understand what you mean by 'rake extension': if you > really want to do rake install, just copying setup.rb into your source > dir and something like > > task :install do > require 'rbconfig' > ruby = File.join(Config::CONFIG["bindir"], > Config::CONFIG['ruby_install_name']) + > Config::CONFIG['EXEEXT'] #FIXME: possible win32 issue with / vs \ > system "#{ruby} setup.rb" > end Well, that's a start. But what i sneeded is being able to use setup.rb as an API, so that we could put in a Rakefile: Rake::SetupTask.new { |st| st.verbose = true # and other options for setup } Then one could do: rake setup config rake setup setup rake setup install See how this turns setup into a reusable component? Now you might think: "What's the big deal? Just Copy setup.rb." But what if the Gem people said the same thing and the RDoc people, and that Rubyforge publisher script, and the ... so forth and so on. My program's directory could soon have more support scripts in it then actual scripts of its own. That's why it's really nice to encapsulate these things via Rake. -- T.