From: "Mauricio Fernández" Date: 2004-08-28T18:26:33+09:00 Subject: Re: Install to bin dir? On Sat, Aug 28, 2004 at 12:04:44PM +0900, T. Onoma wrote: > Hmm... > > Config::CONFIG["destdir"] > > and not? > > Config::CONFIG['bindir'] Oops, clearly CONFIG["bindir"] -- in fact that was my rather laconic initial draft ("require 'rbconfig'; bindir = Config::CONFIG['bindir']"), but I introduced the braino when writing the code above :P > > If you're following the 'standard' source layout (lib/, bin/, etc), > > I suggest you use setup.rb from Aoki Minero: that way all you have to > > do is copy setup.rb into your source dir, period (in most cases at least). > > Is setup.rb considered the "premier" way to do it? Looks like it handles > compiling for .so too. Is that right? I wonder if it would be worth turning > setup.rb into a rake extension? (And how hard it would be?). 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. I would have preferred RubyGems to work as a metadata/dependency layer on top of setup.rb. 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 would do. -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com